Fix parameter errors in WHOIS handlers.

This commit is contained in:
Shiz 2014-02-13 23:41:34 +01:00
parent 54eed86e11
commit b482187dcc
1 changed files with 5 additions and 5 deletions

View File

@ -654,7 +654,7 @@ class RFC1459Support(BasicClient):
def on_raw_313(self, message):
""" WHOIS operator info. """
target, nickname = message.params[0]
target, nickname = message.params[:2]
info = {
'oper': True
}
@ -678,7 +678,7 @@ class RFC1459Support(BasicClient):
def on_raw_317(self, message):
""" WHOIS idle time. """
target, nickname, idle_time = message.params[:2]
target, nickname, idle_time = message.params[:3]
info = {
'idle': int(idle_time),
}
@ -697,7 +697,7 @@ class RFC1459Support(BasicClient):
def on_raw_319(self, message):
""" WHOIS active channels. """
target, nickname, channels = message.params[:2]
target, nickname, channels = message.params[:3]
channels = { channel.lstrip() for channel in channels.split(' ') }
info = {
'channels': channels
@ -708,7 +708,7 @@ class RFC1459Support(BasicClient):
def on_raw_324(self, message):
""" Channel mode. """
target, channel = message.params[0], message.params[1]
target, channel = message.params[:2]
modes = message.params[2:]
if not self.in_channel(channel):
return
@ -799,7 +799,7 @@ class RFC1459Support(BasicClient):
def on_raw_401(self, message):
""" No such nick/channel. """
nickname = message.params[0]
nickname = message.params[1]
if nickname in self._requests['whois']:
future = self._requests['whois'].pop(nickname)
future.set_result(None)