diff options
Diffstat (limited to 'plugins/figlet.py')
-rw-r--r-- | plugins/figlet.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/figlet.py b/plugins/figlet.py index cf885352..4d147956 100644 --- a/plugins/figlet.py +++ b/plugins/figlet.py @@ -3,11 +3,11 @@ import subprocess class Plugin(BasePlugin): def init(self): - self.add_poezio_event_handler('muc_say', self.figletize) - self.add_poezio_event_handler('conversation_say', self.figletize) - self.add_poezio_event_handler('private_say', self.figletize) + self.add_event_handler('muc_say', self.figletize) + self.add_event_handler('conversation_say', self.figletize) + self.add_event_handler('private_say', self.figletize) - def figletize(self, msg): + def figletize(self, msg, tab): process = subprocess.Popen(['figlet', msg['body']], stdout=subprocess.PIPE) result = process.communicate()[0].decode('utf-8') msg['body'] = result |