mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Added a network attribute to the Irc object.
This commit is contained in:
parent
755f2c3564
commit
43c00a3f94
@ -150,7 +150,8 @@ irclib.Irc:
|
||||
prefix: The current prefix of the bot.
|
||||
|
||||
server: The current server the bot is connected to.
|
||||
Usually consists of a (host, port) pair.
|
||||
|
||||
network: The current network name the bot is connected to.
|
||||
|
||||
afterConnect: False until the bot has received a
|
||||
command sent after the connection is finished --
|
||||
|
@ -539,7 +539,11 @@ class Irc(IrcCommandDispatcher):
|
||||
|
||||
def do001(self, msg):
|
||||
"""Does some logging."""
|
||||
log.info('Received 001 from the server.')
|
||||
welcome = msg.args[1]
|
||||
assert welcome.startswith('Welcome to the ')
|
||||
words = welcome.split()
|
||||
self.network = words[3].lower()
|
||||
log.info('Setting network to %s.', self.network)
|
||||
|
||||
def do002(self, msg):
|
||||
"""Logs the ircd version."""
|
||||
|
Loading…
Reference in New Issue
Block a user