summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-10-29 07:05:19 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-10-29 07:05:19 +0200
commit881de6a7c02e4c11957a1bb0dd3b31b8884fa8b0 (patch)
tree4685a5ed23128458435ce92258eb6fb70c95e03a /src/core.py
parenta090b235d70c826ad823898800917c04e84a5535 (diff)
downloadpoezio-881de6a7c02e4c11957a1bb0dd3b31b8884fa8b0.tar.gz
poezio-881de6a7c02e4c11957a1bb0dd3b31b8884fa8b0.tar.bz2
poezio-881de6a7c02e4c11957a1bb0dd3b31b8884fa8b0.tar.xz
poezio-881de6a7c02e4c11957a1bb0dd3b31b8884fa8b0.zip
add get_conversation_messages for the plugin API
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index 5f734142..b39bf904 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1734,3 +1734,15 @@ class Core(object):
self.remote_fifo = None
else:
pass
+
+ def get_conversation_messages(self):
+ """
+ Returns a list of all the messages in the current chat.
+ If the current tab is not a ChatTab, returns None.
+
+ Messages are namedtuples of the form
+ ('txt nick_color time str_time nickname user')
+ """
+ if not isinstance(self.current_tab(), tabs.ChatTab):
+ return None
+ return self.current_tab().get_conversation_messages()