summaryrefslogtreecommitdiff
path: root/plugins/simple_notify.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/simple_notify.py')
-rw-r--r--plugins/simple_notify.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/simple_notify.py b/plugins/simple_notify.py
index d274e0ee..62b1f81a 100644
--- a/plugins/simple_notify.py
+++ b/plugins/simple_notify.py
@@ -5,9 +5,9 @@ import shlex
class Plugin(BasePlugin):
def init(self):
- self.add_event_handler('private_msg', self.on_private_msg)
- self.add_event_handler('conversation_msg', self.on_conversation_msg)
- self.add_event_handler('highlight', self.on_highlight)
+ self.api.add_event_handler('private_msg', self.on_private_msg)
+ self.api.add_event_handler('conversation_msg', self.on_conversation_msg)
+ self.api.add_event_handler('highlight', self.on_highlight)
def on_private_msg(self, message, tab):
fro = message['from']
@@ -27,7 +27,7 @@ class Plugin(BasePlugin):
return
command_str = self.config.get('command', '').strip()
if not command_str:
- self.core.information('No notification command was provided in the configuration file', 'Warning')
+ self.api.information('No notification command was provided in the configuration file', 'Warning')
return
command = [arg % {'body': body.replace('\n', ' '), 'from': fro} for arg in shlex.split(command_str)]
self.core.exec_command(command)
@@ -36,4 +36,4 @@ class Plugin(BasePlugin):
return
after_command = [arg % {'body': body.replace('\n', ' '), 'from': fro} for arg in shlex.split(after_command_str)]
delayed_event = DelayedEvent(self.config.get('delay', 1), self.core.exec_command, after_command)
- self.core.add_timed_event(delayed_event)
+ self.api.add_timed_event(delayed_event)