use only full color mode when sending messages. Simple color mode should never

be used in any part of the code except inside the input.
This commit is contained in:
Florent Le Coz 2011-11-07 19:47:16 +01:00
parent 8911f85a42
commit 17e5411d8f

View file

@ -323,7 +323,7 @@ class ChatTab(Tab):
if not self.execute_command(clean_text):
if txt.startswith('//'):
txt = txt[1:]
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):
@ -601,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')
@ -718,7 +718,7 @@ 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
@ -1211,7 +1211,7 @@ 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'
@ -1875,7 +1875,7 @@ 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'