From 086dfeb9563840e0dcba8c1faf2143e5a8e94511 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 14 Jan 2014 03:45:05 +0100 Subject: asybot: only disconnect if connected --- IRC/ircasy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IRC') diff --git a/IRC/ircasy.py b/IRC/ircasy.py index 3d2d313..7821305 100644 --- a/IRC/ircasy.py +++ b/IRC/ircasy.py @@ -131,7 +131,8 @@ class asybot(asychat): self.close() def reconnect(self): - self.push('QUIT') + if self.connected: + self.push('QUIT') self.close() self.create_socket(AF_INET, SOCK_STREAM) self.connect((self.server, self.port)) -- cgit v1.2.3