summaryrefslogtreecommitdiff
path: root/IrcHandler.py
diff options
context:
space:
mode:
authorJoe Robinson <joe@grabyo.com>2017-04-19 14:32:48 +0100
committerJoe Robinson <joe@grabyo.com>2017-04-19 14:32:48 +0100
commit37d883535366f03e3ee4044a59569942864af0a5 (patch)
treefa7cf527d2defb6291e45f932abc5ba55c57e01a /IrcHandler.py
parent5422ca830c2d5f2845c837cccf00a42f4e310fa6 (diff)
Add topic handling
Diffstat (limited to 'IrcHandler.py')
-rw-r--r--IrcHandler.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/IrcHandler.py b/IrcHandler.py
index 7e0618c..bf5c166 100644
--- a/IrcHandler.py
+++ b/IrcHandler.py
@@ -121,12 +121,19 @@ class IrcHandler(QObject):
channel.remove_user(user)
chat_area.append(user + " left " + channelStr)
+ def handle_topic(self, channelStr, topic):
+ if (channelStr in self.channels):
+ channel = self.channels.get(channelStr)
+ channel.set_topic(topic)
+ self.window.update_topic(channel, topic)
+
def connect_to_irc(self, view):
self.irc.sig.connect(self.handle_msg)
self.irc.join_sig.connect(self.join_channel)
self.irc.namreply_sig.connect(self.handle_nicks)
self.irc.nick_sig.connect(self.handle_join)
self.irc.part_sig.connect(self.handle_part)
+ self.irc.topic_sig.connect(self.handle_topic)
# self.irc.join_sig.connect(self.join_channel)
self.irc.start()
self.sig.connect(self.irc.send_msg)