summaryrefslogtreecommitdiffstats
path: root/Reaktor/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
commit9c2e4bce1eb2834259f92ed8463b34e1528d0de5 (patch)
tree286c2eced8ee5eff4b2759549047f4bf5f474d80 /Reaktor/IRC
parentcb60cf60d73d81918bcd2745192111305cfffd54 (diff)
asybot: only disconnect if connected
Diffstat (limited to 'Reaktor/IRC')
-rw-r--r--Reaktor/IRC/ircasy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Reaktor/IRC/ircasy.py b/Reaktor/IRC/ircasy.py
index 3d2d3137..7821305f 100644
--- a/Reaktor/IRC/ircasy.py
+++ b/Reaktor/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))