aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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))