summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-09 14:29:13 +0100
committermathieui <mathieui@mathieui.net>2011-11-09 14:29:13 +0100
commitaee7baab245e7edabc960e52f6062393197b6a38 (patch)
tree194bdb1b2dc1f19c384c20166f71faa2480e7da8
parent5e840e64373522c484dfd4e24d4a60bcb7c21825 (diff)
downloadpoezio-aee7baab245e7edabc960e52f6062393197b6a38.tar.gz
poezio-aee7baab245e7edabc960e52f6062393197b6a38.tar.bz2
poezio-aee7baab245e7edabc960e52f6062393197b6a38.tar.xz
poezio-aee7baab245e7edabc960e52f6062393197b6a38.zip
Same as previous commit, but with _say
-rw-r--r--plugins/figlet.py2
-rw-r--r--plugins/rainbow.py2
-rw-r--r--src/tabs.py6
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/figlet.py b/plugins/figlet.py
index 52bbc67a..4d147956 100644
--- a/plugins/figlet.py
+++ b/plugins/figlet.py
@@ -7,7 +7,7 @@ class Plugin(BasePlugin):
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
diff --git a/plugins/rainbow.py b/plugins/rainbow.py
index 8a73da03..3c4813d0 100644
--- a/plugins/rainbow.py
+++ b/plugins/rainbow.py
@@ -16,5 +16,5 @@ class Plugin(BasePlugin):
self.add_event_handler('private_say', self.rainbowize)
self.add_event_handler('conversation_say', self.rainbowize)
- def rainbowize(self, msg):
+ def rainbowize(self, msg, tab):
msg['body'] = ''.join(['%s%s' % (rand_color(),char,) for char in xhtml.clean_text(msg['body'])])
diff --git a/src/tabs.py b/src/tabs.py
index 6f100741..93f48757 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -722,7 +722,7 @@ class MucTab(ChatTab):
# trigger the event BEFORE looking for colors.
# This lets a plugin insert \x19xxx} colors, that will
# be converted in xhtml.
- self.core.events.trigger('muc_say', msg)
+ self.core.events.trigger('muc_say', msg, self)
if msg['body'].find('\x19') != -1:
msg['xhtml_im'] = xhtml.poezio_colors_to_html(msg['body'])
msg['body'] = xhtml.clean_text(msg['body'])
@@ -1217,7 +1217,7 @@ class PrivateTab(ChatTab):
# trigger the event BEFORE looking for colors.
# This lets a plugin insert \x19xxx} colors, that will
# be converted in xhtml.
- self.core.events.trigger('private_say', msg)
+ self.core.events.trigger('private_say', msg, self)
self.core.add_message_to_text_buffer(self._text_buffer, msg['body'], None, self.core.own_nick or self.own_nick)
if msg['body'].find('\x19') != -1:
msg['xhtml_im'] = xhtml.poezio_colors_to_html(msg['body'])
@@ -1894,7 +1894,7 @@ class ConversationTab(ChatTab):
# and before displaying the message in the window
# This lets a plugin insert \x19xxx} colors, that will
# be converted in xhtml.
- self.core.events.trigger('conversation_say', msg)
+ self.core.events.trigger('conversation_say', msg, self)
self.core.add_message_to_text_buffer(self._text_buffer, msg['body'], None, self.core.own_nick)
if msg['body'].find('\x19') != -1:
msg['xhtml_im'] = xhtml.poezio_colors_to_html(msg['body'])