diff options
author | lassulus <lassulus@googlemail.com> | 2014-01-14 03:45:05 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2014-01-14 03:45:05 +0100 |
commit | 086dfeb9563840e0dcba8c1faf2143e5a8e94511 (patch) | |
tree | fa25a09f5789ed713138814fcafb903a0981611a | |
parent | 8cf5cb9949de2a8b3645b05442142f02e40400af (diff) |
asybot: only disconnect if connected
-rw-r--r-- | IRC/ircasy.py | 3 |
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)) |