Skip to content

Commit

Permalink
Dont re-add ircbot event handlers on reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
greghaynes committed Nov 15, 2009
1 parent bf8088a commit 7e1cc14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pyscripts/IrcBot/asynirc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def __init__(self, serverinfo, clientinfo, use_logging=True):
self.throttle_size = 512
self.trottle_time = 1
self.part_message = 'PyAsyncirc Bot'
self.events.connect('PING', self.handle_pong)
self.events.connect('MODE', self.handle_mode)
self.events.connect('PRIVMSG', self.handle_raw_privmsg)
def logInfo(self, string):
if(self.use_logging):
logging.info(string)
Expand All @@ -62,9 +65,6 @@ def doConnect(self):
self.throttle_timeout = time.time() + self.throttle_size
self.throttle_used = 0
def handle_connect(self):
self.events.connect('PING', self.handle_pong)
self.events.connect('MODE', self.handle_mode)
self.events.connect('PRIVMSG', self.handle_raw_privmsg)
self.work_queue.append('NICK :%s\r\n' % self.nick)
self.work_queue.append('USER %s %s %s :%s\r\n' % (self.username, self.hostname, self.servername, self.realname))
def handle_close(self):
Expand Down

0 comments on commit 7e1cc14

Please sign in to comment.