This file was hanging back on protocol since it's been less used.

This commit is contained in:
Jeremy Fincher 2003-07-23 02:16:06 +00:00
parent 50bcc22e24
commit ebc3533275

View File

@ -58,11 +58,10 @@ class AsyncoreRunnerDriver(drivers.IrcDriver):
class AsyncoreDriver(asynchat.async_chat, object): class AsyncoreDriver(asynchat.async_chat, object):
def __init__(self, (server, port), irc, reconnect=True): def __init__(self, (server, port), irc):
#debug.methodNamePrintf(self, '__init__') #debug.methodNamePrintf(self, '__init__')
asynchat.async_chat.__init__(self) asynchat.async_chat.__init__(self)
self.server = (server, port) self.server = (server, port)
self.reconnect = reconnect
self.irc = irc self.irc = irc
self.irc.driver = self self.irc.driver = self
self.buffer = '' self.buffer = ''
@ -76,13 +75,12 @@ class AsyncoreDriver(asynchat.async_chat, object):
self.close() self.close()
def scheduleReconnect(self): def scheduleReconnect(self):
if self.reconnect:
when = time.time() + 60 when = time.time() + 60
whenS = time.strftime(conf.timestampFormat, time.localtime(when)) whenS = time.strftime(conf.timestampFormat, time.localtime(when))
debug.msg('Scheduling reconnect at %s' % whenS, 'normal') debug.msg('Scheduling reconnect at %s' % whenS, 'normal')
def makeNewDriver(): def makeNewDriver():
self.irc.reset() self.irc.reset()
driver = self.__class__(self.server, self.irc, self.reconnect) driver = self.__class__(self.server, self.irc)
driver.irc.driver = driver driver.irc.driver = driver
schedule.addEvent(makeNewDriver, when) schedule.addEvent(makeNewDriver, when)