Fixed 001 for misconfigured servers.

This commit is contained in:
Jeremy Fincher 2004-04-17 14:12:17 +00:00
parent e194e89c85
commit 2d2340bf17

View File

@ -566,7 +566,10 @@ class Irc(IrcCommandDispatcher):
welcome = msg.args[1] welcome = msg.args[1]
if not welcome.startswith('Welcome to the '): if not welcome.startswith('Welcome to the '):
log.info('Unexpected 001 welcome, guessing at network name.') log.info('Unexpected 001 welcome, guessing at network name.')
self.network = msg.prefix
else:
words = welcome.split() words = welcome.split()
# We assume there is one more word after "Welcome to the ".
self.network = words[3].lower() self.network = words[3].lower()
log.info('Setting network to %s.', self.network) log.info('Setting network to %s.', self.network)