summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/day_change.py3
-rw-r--r--src/tabs.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/day_change.py b/plugins/day_change.py
index cac69a75..14924684 100644
--- a/plugins/day_change.py
+++ b/plugins/day_change.py
@@ -24,8 +24,7 @@ class Plugin(BasePlugin):
if (isinstance(tab, tabs.MucTab) or
isinstance(tab, tabs.PrivateTab) or
isinstance(tab, tabs.ConversationTab)):
- room = tab.get_room()
- room.add_message(msg)
+ tab.add_message(msg)
self.core.refresh_window()
self.schedule_event()
diff --git a/src/tabs.py b/src/tabs.py
index 984d428f..f26c34b6 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1995,6 +1995,9 @@ class ConversationTab(ChatTab):
if config.get('send_chat_states', 'true') == 'true':
self.send_chat_state('gone')
+ def add_message(self, txt, time=None, nickname=None, forced_user=None):
+ self._text_buffer.add_message(txt, time, nickname, None, None, forced_user)
+
class MucListTab(Tab):
"""
A tab listing rooms from a specific server, displaying various information,