mirror of https://github.com/Shizmob/pydle.git
Fix parameter errors in WHOIS handlers.
This commit is contained in:
parent
54eed86e11
commit
b482187dcc
|
@ -654,7 +654,7 @@ class RFC1459Support(BasicClient):
|
||||||
|
|
||||||
def on_raw_313(self, message):
|
def on_raw_313(self, message):
|
||||||
""" WHOIS operator info. """
|
""" WHOIS operator info. """
|
||||||
target, nickname = message.params[0]
|
target, nickname = message.params[:2]
|
||||||
info = {
|
info = {
|
||||||
'oper': True
|
'oper': True
|
||||||
}
|
}
|
||||||
|
@ -678,7 +678,7 @@ class RFC1459Support(BasicClient):
|
||||||
|
|
||||||
def on_raw_317(self, message):
|
def on_raw_317(self, message):
|
||||||
""" WHOIS idle time. """
|
""" WHOIS idle time. """
|
||||||
target, nickname, idle_time = message.params[:2]
|
target, nickname, idle_time = message.params[:3]
|
||||||
info = {
|
info = {
|
||||||
'idle': int(idle_time),
|
'idle': int(idle_time),
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,7 @@ class RFC1459Support(BasicClient):
|
||||||
|
|
||||||
def on_raw_319(self, message):
|
def on_raw_319(self, message):
|
||||||
""" WHOIS active channels. """
|
""" WHOIS active channels. """
|
||||||
target, nickname, channels = message.params[:2]
|
target, nickname, channels = message.params[:3]
|
||||||
channels = { channel.lstrip() for channel in channels.split(' ') }
|
channels = { channel.lstrip() for channel in channels.split(' ') }
|
||||||
info = {
|
info = {
|
||||||
'channels': channels
|
'channels': channels
|
||||||
|
@ -708,7 +708,7 @@ class RFC1459Support(BasicClient):
|
||||||
|
|
||||||
def on_raw_324(self, message):
|
def on_raw_324(self, message):
|
||||||
""" Channel mode. """
|
""" Channel mode. """
|
||||||
target, channel = message.params[0], message.params[1]
|
target, channel = message.params[:2]
|
||||||
modes = message.params[2:]
|
modes = message.params[2:]
|
||||||
if not self.in_channel(channel):
|
if not self.in_channel(channel):
|
||||||
return
|
return
|
||||||
|
@ -799,7 +799,7 @@ class RFC1459Support(BasicClient):
|
||||||
|
|
||||||
def on_raw_401(self, message):
|
def on_raw_401(self, message):
|
||||||
""" No such nick/channel. """
|
""" No such nick/channel. """
|
||||||
nickname = message.params[0]
|
nickname = message.params[1]
|
||||||
if nickname in self._requests['whois']:
|
if nickname in self._requests['whois']:
|
||||||
future = self._requests['whois'].pop(nickname)
|
future = self._requests['whois'].pop(nickname)
|
||||||
future.set_result(None)
|
future.set_result(None)
|
||||||
|
|
Loading…
Reference in New Issue