diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-09-08 17:05:02 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-09-08 17:05:02 +0200 |
commit | 2e04c5c77e64a45e9ab8a23b8cb7a683630eb067 (patch) | |
tree | 6ddd5d14785fe712b60806f408c6c641d2f3a7ca /src/room.py | |
parent | a8081875509a5b836b1d3b37322b06c8ac0103d2 (diff) | |
download | poezio-2e04c5c77e64a45e9ab8a23b8cb7a683630eb067.tar.gz poezio-2e04c5c77e64a45e9ab8a23b8cb7a683630eb067.tar.bz2 poezio-2e04c5c77e64a45e9ab8a23b8cb7a683630eb067.tar.xz poezio-2e04c5c77e64a45e9ab8a23b8cb7a683630eb067.zip |
c code that doesn’t work
Diffstat (limited to 'src/room.py')
-rw-r--r-- | src/room.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/room.py b/src/room.py index 5d4c4ce6..1ca3f599 100644 --- a/src/room.py +++ b/src/room.py @@ -1,18 +1,9 @@ -# Copyright 2010-2011 Le Coz Florent <louiz@louiz.org> +# Copyright 2010-2011 Florent Le Coz <louiz@louiz.org> # # This file is part of Poezio. # # Poezio is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# Poezio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Poezio. If not, see <http://www.gnu.org/licenses/>. +# it under the terms of the MIT license. See the COPYING file. from text_buffer import TextBuffer, Message from datetime import datetime @@ -129,7 +120,9 @@ class Room(TextBuffer): nick_color = highlight time = time or datetime.now() message = Message(txt='%s\x19o'%(txt,), nick_color=nick_color, - time=time, nickname=nickname, user=user) + time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\ + if history else time.strftime("%H:%M:%S"),\ + nickname=nickname, user=user) while len(self.messages) > self.messages_nb_limit: self.messages.pop(0) self.messages.append(message) |