summaryrefslogtreecommitdiff
path: root/src/text_buffer.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/text_buffer.py')
-rw-r--r--src/text_buffer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/text_buffer.py b/src/text_buffer.py
index f20c0cb9..8430a230 100644
--- a/src/text_buffer.py
+++ b/src/text_buffer.py
@@ -35,6 +35,11 @@ class TextBuffer(object):
def add_window(self, win):
self.windows.append(win)
+ @property
+ def last_message(self):
+ return self.messages[-1] if self.messages else None
+
+
def make_message(self, txt, time, nickname, nick_color, history, user, identifier, str_time=None):
time = time or datetime.now()
if txt.startswith('/me '):