aboutsummaryrefslogtreecommitdiffstats
path: root/IRC
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2014-01-14 03:45:05 +0100
committerlassulus <lassulus@googlemail.com>2014-01-14 03:45:05 +0100
commit086dfeb9563840e0dcba8c1faf2143e5a8e94511 (patch)
treefa25a09f5789ed713138814fcafb903a0981611a /IRC
parent8cf5cb9949de2a8b3645b05442142f02e40400af (diff)
asybot: only disconnect if connected
Diffstat (limited to 'IRC')
-rw-r--r--IRC/ircasy.py3
1 files changed, 2 insertions, 1 deletions
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))