diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-11-06 16:00:41 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-11-06 16:00:41 +0100 |
commit | 6597d833550d8469490a8840d58a82cb35c04138 (patch) | |
tree | ca98291bafa1be02a99aeee3beeabc8679f9a430 /src/text_buffer.py | |
parent | 0dd3b171e5049276b15b9287915aa7a124ae9420 (diff) | |
parent | 7bf63c51e2650042932ad78207ce5366bab3e38a (diff) | |
download | poezio-6597d833550d8469490a8840d58a82cb35c04138.tar.gz poezio-6597d833550d8469490a8840d58a82cb35c04138.tar.bz2 poezio-6597d833550d8469490a8840d58a82cb35c04138.tar.xz poezio-6597d833550d8469490a8840d58a82cb35c04138.zip |
Merge branch 'master' into plugins
Diffstat (limited to 'src/text_buffer.py')
-rw-r--r-- | src/text_buffer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/text_buffer.py b/src/text_buffer.py index f39f147a..94bd94b9 100644 --- a/src/text_buffer.py +++ b/src/text_buffer.py @@ -34,19 +34,19 @@ class TextBuffer(object): def add_window(self, win): self.windows.append(win) - def add_message(self, txt, time=None, nickname=None, nick_color=None, history=None): + def add_message(self, txt, time=None, nickname=None, nick_color=None, history=None, user=None): time = time or datetime.now() msg = Message(txt='%s\x19o'%(txt.replace('\t', ' '),), nick_color=nick_color, time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\ if history else time.strftime("%H:%M:%S"),\ - nickname=nickname, user=None) + nickname=nickname, user=user) self.messages.append(msg) while len(self.messages) > self.messages_nb_limit: self.messages.pop(0) ret_val = None for window in self.windows: # make the associated windows # build the lines from the new message - nb = window.build_new_message(msg) + nb = window.build_new_message(msg, history=history) if ret_val is None: ret_val = nb if window.pos != 0: |