summaryrefslogtreecommitdiff
path: root/plugins/quote.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-05-20 13:43:53 +0200
committerFlorent Le Coz <louiz@louiz.org>2012-05-20 13:43:53 +0200
commit65c2d3dc8891eae4307375eef4b79d13ac793e46 (patch)
tree98359af6c6d9809585b52dcc1aadf083fa590412 /plugins/quote.py
parent0f0efb7ada6ad60f88360bc6a8feb3607fcabd3c (diff)
parent51c788ad96703d215942499ffefe6fdc98326b6b (diff)
downloadpoezio-65c2d3dc8891eae4307375eef4b79d13ac793e46.tar.gz
poezio-65c2d3dc8891eae4307375eef4b79d13ac793e46.tar.bz2
poezio-65c2d3dc8891eae4307375eef4b79d13ac793e46.tar.xz
poezio-65c2d3dc8891eae4307375eef4b79d13ac793e46.zip
Merge branch 'master' of https://git.louiz.org/poezio
Diffstat (limited to 'plugins/quote.py')
-rw-r--r--plugins/quote.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/quote.py b/plugins/quote.py
index 788d4027..50c390f2 100644
--- a/plugins/quote.py
+++ b/plugins/quote.py
@@ -1,7 +1,7 @@
-from plugin import BasePlugin, PluginConfig
+from plugin import BasePlugin
from xhtml import clean_text
import common
-
+import tabs
import re
timestamp_re = re.compile(r'^(\d\d\d\d-\d\d-\d\d )?\d\d:\d\d:\d\d$')
@@ -12,7 +12,9 @@ log = logging.getLogger(__name__)
class Plugin(BasePlugin):
def init(self):
- self.add_command('quote', self.command_quote, "Usage: /quote <timestamp>\nQuote: takes the message received at <timestamp> and insert it in the input, to quote it.", self.completion_quote)
+ self.add_tab_command(tabs.MucTab, 'quote', self.command_quote, "Usage: /quote <timestamp>\nQuote: takes the message received at <timestamp> and insert it in the input, to quote it.", self.completion_quote)
+ self.add_tab_command(tabs.ConversationTab, 'quote', self.command_quote, "Usage: /quote <timestamp>\nQuote: takes the message received at <timestamp> and insert it in the input, to quote it.", self.completion_quote)
+ self.add_tab_command(tabs.PrivateTab, 'quote', self.command_quote, "Usage: /quote <timestamp>\nQuote: takes the message received at <timestamp> and insert it in the input, to quote it.", self.completion_quote)
def command_quote(self, args):
args = common.shell_split(args)