Skip to content

Commit aee7baa

Browse files
committed
Same as previous commit, but with _say
1 parent 5e840e6 commit aee7baa

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

plugins/figlet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def init(self):
77
self.add_event_handler('conversation_say', self.figletize)
88
self.add_event_handler('private_say', self.figletize)
99

10-
def figletize(self, msg):
10+
def figletize(self, msg, tab):
1111
process = subprocess.Popen(['figlet', msg['body']], stdout=subprocess.PIPE)
1212
result = process.communicate()[0].decode('utf-8')
1313
msg['body'] = result

plugins/rainbow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ def init(self):
1616
self.add_event_handler('private_say', self.rainbowize)
1717
self.add_event_handler('conversation_say', self.rainbowize)
1818

19-
def rainbowize(self, msg):
19+
def rainbowize(self, msg, tab):
2020
msg['body'] = ''.join(['%s%s' % (rand_color(),char,) for char in xhtml.clean_text(msg['body'])])

src/tabs.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ def command_say(self, line):
722722
# trigger the event BEFORE looking for colors.
723723
# This lets a plugin insert \x19xxx} colors, that will
724724
# be converted in xhtml.
725-
self.core.events.trigger('muc_say', msg)
725+
self.core.events.trigger('muc_say', msg, self)
726726
if msg['body'].find('\x19') != -1:
727727
msg['xhtml_im'] = xhtml.poezio_colors_to_html(msg['body'])
728728
msg['body'] = xhtml.clean_text(msg['body'])
@@ -1217,7 +1217,7 @@ def command_say(self, line):
12171217
# trigger the event BEFORE looking for colors.
12181218
# This lets a plugin insert \x19xxx} colors, that will
12191219
# be converted in xhtml.
1220-
self.core.events.trigger('private_say', msg)
1220+
self.core.events.trigger('private_say', msg, self)
12211221
self.core.add_message_to_text_buffer(self._text_buffer, msg['body'], None, self.core.own_nick or self.own_nick)
12221222
if msg['body'].find('\x19') != -1:
12231223
msg['xhtml_im'] = xhtml.poezio_colors_to_html(msg['body'])
@@ -1894,7 +1894,7 @@ def command_say(self, line):
18941894
# and before displaying the message in the window
18951895
# This lets a plugin insert \x19xxx} colors, that will
18961896
# be converted in xhtml.
1897-
self.core.events.trigger('conversation_say', msg)
1897+
self.core.events.trigger('conversation_say', msg, self)
18981898
self.core.add_message_to_text_buffer(self._text_buffer, msg['body'], None, self.core.own_nick)
18991899
if msg['body'].find('\x19') != -1:
19001900
msg['xhtml_im'] = xhtml.poezio_colors_to_html(msg['body'])

0 commit comments

Comments
 (0)