summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 78f56bdb..cae188ae 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -323,8 +323,7 @@ class ChatTab(Tab):
if not self.execute_command(clean_text):
if txt.startswith('//'):
txt = txt[1:]
- self.core.run_event('enter', line=txt)
- self.command_say(txt)
+ self.command_say(xhtml.convert_simple_to_full_colors(txt))
self.cancel_paused_delay()
def send_chat_state(self, state, always_send=False):
@@ -602,7 +601,7 @@ class MucTab(ChatTab):
r = self.core.open_private_window(self.name, user.nick)
if r and len(args) > 1:
msg = arg[len(nick)+1:]
- self.core.current_tab().command_say(msg)
+ self.core.current_tab().command_say(xhtml.convert_simple_to_full_colors(msg))
if not r:
self.core.information(_("Cannot find user: %s" % nick), 'Error')
@@ -719,10 +718,11 @@ class MucTab(ChatTab):
if line.find('\x19') == -1:
msg['body'] = line
else:
- msg['body'] = xhtml.clean_text_simple(line)
+ msg['body'] = xhtml.clean_text(line)
msg['xhtml_im'] = xhtml.poezio_colors_to_html(line)
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
msg['chat_state'] = needed
+ self.core.events.trigger('muc_say', msg)
self.cancel_paused_delay()
msg.send()
self.chat_state = needed
@@ -1211,11 +1211,12 @@ class PrivateTab(ChatTab):
if line.find('\x19') == -1:
msg['body'] = line
else:
- msg['body'] = xhtml.clean_text_simple(line)
+ msg['body'] = xhtml.clean_text(line)
msg['xhtml_im'] = xhtml.poezio_colors_to_html(line)
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active'
msg['chat_state'] = needed
+ self.core.events.trigger('private_say', msg)
msg.send()
self.core.add_message_to_text_buffer(self._text_buffer, xhtml.convert_simple_to_full_colors(line), None, self.core.own_nick or self.own_nick)
self.cancel_paused_delay()
@@ -1874,11 +1875,12 @@ class ConversationTab(ChatTab):
if line.find('\x19') == -1:
msg['body'] = line
else:
- msg['body'] = xhtml.clean_text_simple(line)
+ msg['body'] = xhtml.clean_text(line)
msg['xhtml_im'] = xhtml.poezio_colors_to_html(line)
if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False:
needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active'
msg['chat_state'] = needed
+ self.core.events.trigger('conversation_say', msg)
msg.send()
self.core.add_message_to_text_buffer(self._text_buffer, xhtml.convert_simple_to_full_colors(line), None, self.core.own_nick)
logger.log_message(JID(self.get_name()).bare, self.core.own_nick, line)