Make sure network is always present, even if unset.

This commit is contained in:
Jeremy Fincher 2004-01-28 19:07:21 +00:00
parent c61e0c20d3
commit f57ceba827

View File

@ -406,6 +406,7 @@ class Irc(IrcCommandDispatcher):
world.ircs.append(self) world.ircs.append(self)
self.originalNick = intern(nick) self.originalNick = intern(nick)
self.nick = self.originalNick self.nick = self.originalNick
self.network = 'unset'
self.nickmods = cycle(conf.supybot.nickmods()) self.nickmods = cycle(conf.supybot.nickmods())
self.password = password self.password = password
self.user = intern(user or nick) # Default to nick self.user = intern(user or nick) # Default to nick
@ -538,7 +539,7 @@ class Irc(IrcCommandDispatcher):
return None return None
def do001(self, msg): def do001(self, msg):
"""Does some logging.""" """Logs (and stores) the name of the network."""
welcome = msg.args[1] welcome = msg.args[1]
assert welcome.startswith('Welcome to the ') assert welcome.startswith('Welcome to the ')
words = welcome.split() words = welcome.split()