diff options
author | mathieui <mathieui@mathieui.net> | 2011-11-08 00:14:44 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-11-08 00:14:44 +0100 |
commit | 33997e43569fb2ea5944fa83812f19a484ce3c32 (patch) | |
tree | e9d622a04358f0f7835fd07fc6ba4223b81891a3 | |
parent | 32a75fd5c746ba6080f43ef56be361deb2e3bad3 (diff) | |
download | poezio-33997e43569fb2ea5944fa83812f19a484ce3c32.tar.gz poezio-33997e43569fb2ea5944fa83812f19a484ce3c32.tar.bz2 poezio-33997e43569fb2ea5944fa83812f19a484ce3c32.tar.xz poezio-33997e43569fb2ea5944fa83812f19a484ce3c32.zip |
Should fix day_change plugin
-rw-r--r-- | plugins/day_change.py | 3 | ||||
-rw-r--r-- | 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, |