From 33997e43569fb2ea5944fa83812f19a484ce3c32 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 8 Nov 2011 00:14:44 +0100 Subject: [PATCH] Should fix day_change plugin --- plugins/day_change.py | 3 +-- src/tabs.py | 3 +++ 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,