From d2b83008c9e6ec9226bac71ca79bfa2f3c999d46 Mon Sep 17 00:00:00 2001 From: Tim Schmidt Date: Sat, 15 Dec 2018 12:30:48 +0100 Subject: HC: added emote and invite, TG: switched to HTML --- hackchatcustom.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hackchatcustom.py') diff --git a/hackchatcustom.py b/hackchatcustom.py index 1c10adc..67de077 100644 --- a/hackchatcustom.py +++ b/hackchatcustom.py @@ -30,6 +30,8 @@ class HackChat: self.on_message = [] self.on_join = [] self.on_leave = [] + self.on_emote = [] + self.on_invite = [] self.stopped = False @@ -107,6 +109,13 @@ class HackChat: elif result["cmd"] == "onlineSet": for nick in result["nicks"]: self.online_users.append(nick) + elif result["cmd"] == "info": + if result["type"] == "emote": + for handler in list(self.on_emote): + handler(self, result) + elif result["type"] == "invite": + for handler in list(self.on_invite): + handler(self, result) def stop(self): """Gracefully stops all bot threads and closes WebSocket connection.""" -- cgit v1.2.1