Skip to content

Commit ef8a7a6

Browse files
committed
Use add_tab_command in the quote plugin
1 parent 28c15a8 commit ef8a7a6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plugins/quote.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from plugin import BasePlugin, PluginConfig
1+
from plugin import BasePlugin
22
from xhtml import clean_text
33
import common
4-
4+
import tabs
55
import re
66

77
timestamp_re = re.compile(r'^(\d\d\d\d-\d\d-\d\d )?\d\d:\d\d:\d\d$')
@@ -12,7 +12,9 @@
1212

1313
class Plugin(BasePlugin):
1414
def init(self):
15-
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)
15+
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)
16+
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)
17+
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)
1618

1719
def command_quote(self, args):
1820
args = common.shell_split(args)

0 commit comments

Comments
 (0)