diff options
Diffstat (limited to 'plugins/tell.py')
-rw-r--r-- | plugins/tell.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/tell.py b/plugins/tell.py index f2ed49c8..d4d722af 100644 --- a/plugins/tell.py +++ b/plugins/tell.py @@ -4,16 +4,16 @@ import common class Plugin(BasePlugin): def init(self): - self.add_tab_command(tabs.MucTab, 'tell', self.command_tell, + self.api.add_tab_command(tabs.MucTab, 'tell', self.command_tell, usage='<nick> <message>', help='Will tell <nick> of <message> when he next joins.', short='Send a message when someone joins') - self.add_tab_command(tabs.MucTab, 'untell', self.command_untell, + self.api.add_tab_command(tabs.MucTab, 'untell', self.command_untell, usage='<nick>', help='Remove the planned messages from /tell.', short='Cancel a /tell message', completion=self.completion_untell) - self.add_event_handler('muc_join', self.on_join) + self.api.add_event_handler('muc_join', self.on_join) # {tab -> {nick -> [messages]} self.tabs = {} @@ -31,20 +31,20 @@ class Plugin(BasePlugin): """/tell <nick> <message>""" arg = common.shell_split(args) if len(arg) != 2: - self.core.command_help('tell') + self.command_help('tell') return nick, msg = arg - tab = self.core.current_tab() + tab = self.api.current_tab() if not tab in self.tabs: self.tabs[tab] = {} if not nick in self.tabs[tab]: self.tabs[tab][nick] = [] self.tabs[tab][nick].append(msg) - self.core.information('Will tell %s' % nick, 'Info') + self.api.information('Will tell %s' % nick, 'Info') def command_untell(self, args): """/untell <nick>""" - tab = self.core.current_tab() + tab = self.api.current_tab() if not tab in self.tabs: return nick = args @@ -53,7 +53,7 @@ class Plugin(BasePlugin): del self.tabs[tab][nick] def completion_untell(self, the_input): - tab = self.core.current_tab() + tab = self.api.current_tab() if not tab in self.tabs: return the_input.auto_completion([], '') return the_input.auto_completion(list(self.tabs[tab]), '') |