Fix more instances of event["args"] (now event["line"].args)
This commit is contained in:
parent
6d82cdcb93
commit
6e93b1e990
4 changed files with 9 additions and 8 deletions
|
@ -35,14 +35,14 @@ class Module(ModuleManager.BaseModule):
|
|||
def on_resume(self, event):
|
||||
cap_done = True
|
||||
|
||||
if event["args"][0] == "SUCCESS":
|
||||
if event["line"].args[0] == "SUCCESS":
|
||||
resume_channels = event["server"].get_setting("resume-channels", [])
|
||||
self.log.info("Successfully resumed session")
|
||||
event["server"].clear_waiting_capabilities()
|
||||
|
||||
elif event["args"][0] == "TOKEN":
|
||||
elif event["line"].args[0] == "TOKEN":
|
||||
token = self._get_token(event["server"])
|
||||
self._set_token(event["server"], event["args"][1], new=True)
|
||||
self._set_token(event["server"], event["line"].args[1], new=True)
|
||||
|
||||
if token:
|
||||
timestamp = event["server"]._resume_timestamp
|
||||
|
|
|
@ -130,7 +130,7 @@ class Module(ModuleManager.BaseModule):
|
|||
|
||||
@utils.hook("received.908")
|
||||
def sasl_mechanisms(self, event):
|
||||
server_mechanisms = event["args"][1].split(",")
|
||||
server_mechanisms = event["line"].args[1].split(",")
|
||||
mechanism = self._best_userpass_mechanism(server_mechanimsms)
|
||||
event["server"].sasl_mechanism = mechanism
|
||||
event["server"].send_authenticate(mechanism)
|
||||
|
@ -140,7 +140,8 @@ class Module(ModuleManager.BaseModule):
|
|||
self._end_sasl(event["server"])
|
||||
@utils.hook("received.904")
|
||||
def sasl_failure(self, event):
|
||||
self._panic(event["server"], "ERR_SASLFAIL (%s)" % event["args"][1])
|
||||
self._panic(event["server"], "ERR_SASLFAIL (%s)" %
|
||||
event["line"].args[1])
|
||||
|
||||
@utils.hook("received.907")
|
||||
def sasl_already(self, event):
|
||||
|
|
|
@ -157,7 +157,7 @@ def kick(events, event):
|
|||
|
||||
def rename(events, event):
|
||||
old_name = event["line"].args[0]
|
||||
new_name = event["args"].args[1]
|
||||
new_name = event["line"].args[1]
|
||||
channel = event["server"].channels.get(old_name)
|
||||
|
||||
event["server"].channels.rename(old_name, new_name)
|
||||
|
|
|
@ -26,7 +26,7 @@ class Module(ModuleManager.BaseModule):
|
|||
@utils.hook("received.731")
|
||||
def mon_offline(self, event):
|
||||
target_nick = event["server"].connection_params.nickname
|
||||
nicks = event["args"][1].split(",")
|
||||
nicks = event["line"].args[1].split(",")
|
||||
nicks = [event["server"].irc_lower(n) for n in nicks]
|
||||
if event["server"].irc_lower(target_nick) in nicks:
|
||||
event["server"].send_nick(target_nick)
|
||||
|
@ -42,7 +42,7 @@ class Module(ModuleManager.BaseModule):
|
|||
@utils.hook("received.303")
|
||||
def ison_response(self, event):
|
||||
target_nick = event["server"].connection_params.nickname
|
||||
if not event["args"][1] and not event["server"].irc_equals(
|
||||
if not event["line"].args[1] and not event["server"].irc_equals(
|
||||
event["server"].nickname, target_nick):
|
||||
event["server"].send_nick(target_nick)
|
||||
|
||||
|
|
Loading…
Reference in a new issue