From 8a0d0dd9f0e98b3f2bc7637e0354f8b0a67b6b47 Mon Sep 17 00:00:00 2001 From: "Sean B. Palmer" Date: Mon, 7 May 2012 21:33:19 +0100 Subject: [PATCH] Attempt to fix the double say and disconnect bug, thanks to theli-ua and tanto --- irc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/irc.py b/irc.py index 30d1146..251ed64 100755 --- a/irc.py +++ b/irc.py @@ -42,6 +42,11 @@ class Bot(asynchat.async_chat): import threading self.sending = threading.RLock() + def initiate_send(self): + self.sending.acquire() + asynchat.async_chat.initiate_send(self) + self.sending.release() + # def push(self, *args, **kargs): # asynchat.async_chat.push(self, *args, **kargs)