From 24ca7ed97f56642601b49cc967003b9844a1c152 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 6 Jun 2019 23:19:57 +0100 Subject: [PATCH] use trigger_write() instead of a raw .send(b"") --- src/IRCBot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IRCBot.py b/src/IRCBot.py index 32a4872b..fc56d109 100644 --- a/src/IRCBot.py +++ b/src/IRCBot.py @@ -322,6 +322,7 @@ class Bot(object): elif server.ping_due() and not server.ping_sent: server.send_ping() server.ping_sent = True + if not server.socket.connected: self._events.on("server.disconnect").call(server=server) self.disconnect(server) @@ -339,4 +340,4 @@ class Bot(object): throttle_filled = True if throttle_filled: - self._wtrigger_client.send(b"TRIGGER") + self.trigger_write()