353 handling in IrcState.

This commit is contained in:
Jeremy Fincher 2004-08-25 23:04:18 +00:00
parent 6b1f742e71
commit ea1ddf1880

View File

@ -355,10 +355,23 @@ class IrcState(IrcCommandDispatcher):
self.supported[arg] = None self.supported[arg] = None
def do352(self, irc, msg): def do352(self, irc, msg):
# WHO reply.
(nick, user, host) = (msg.args[5], msg.args[2], msg.args[3]) (nick, user, host) = (msg.args[5], msg.args[2], msg.args[3])
hostmask = '%s!%s@%s' % (nick, user, host) hostmask = '%s!%s@%s' % (nick, user, host)
self.nicksToHostmasks[nick] = hostmask self.nicksToHostmasks[nick] = hostmask
def do353(self, irc, msg):
# NAMES reply.
channel = msg.args[2]
names = msg.args[-1].split()
if channel not in self.channels:
self.channels[channel] = Channel()
c = self.channels[channel]
for name in names:
c.addUser(name)
if msg.args[1] == '@':
c.modes['s'] = None
def doJoin(self, irc, msg): def doJoin(self, irc, msg):
for channel in msg.args[0].split(','): for channel in msg.args[0].split(','):
if channel in self.channels: if channel in self.channels: