Fix WHO clash with external plugins (e.g. ChanTracker)

This commit is contained in:
nyuszika7h 2014-08-04 21:32:13 +02:00
parent 8efcc4a009
commit 20c71df8f9
2 changed files with 9 additions and 3 deletions

View File

@ -205,7 +205,10 @@ class NickAuth(callbacks.Plugin):
ircdb.users.setUser(user, flush=False)
def do354(self, irc, msg):
(__, ident, host, nick, account) = msg.args
if len(msg.args) != 6 or msg.args[1] != '1':
return
(__, ___, ident, host, nick, account) = msg.args
prefix = '%s!%s@%s' % (nick, ident, host)
user = ircdb.users.getUserFromNick(irc.network, account)

View File

@ -491,7 +491,10 @@ class IrcState(IrcCommandDispatcher):
def do354(self, irc, msg):
# WHOX reply.
(__, user, host, nick, ___) = msg.args
if len(msg.args) != 6 or msg.args[1] != '1':
return
(__, ___, user, host, nick, ___) = msg.args
hostmask = '%s!%s@%s' % (nick, user, host)
self.nicksToHostmasks[nick] = hostmask
@ -1090,7 +1093,7 @@ class Irc(IrcCommandDispatcher):
def doJoin(self, msg):
if msg.nick == self.nick:
channel = msg.args[0]
self.queueMsg(ircmsgs.who(channel, args=('%uhna',))) # Ends with 315.
self.queueMsg(ircmsgs.who(channel, args=('%tuhna,1',))) # Ends with 315.
self.queueMsg(ircmsgs.mode(channel)) # Ends with 329.
for channel in msg.args[0].split(','):
self.queueMsg(ircmsgs.mode(channel, '+b'))