mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-26 20:24:34 +01:00
opercmds: rename hook payloads to be more consistent
This commit is contained in:
parent
a72f710a69
commit
9e97dd0b75
@ -217,7 +217,7 @@ def kick(irc, source, args):
|
|||||||
sender = irc.pseudoclient.uid
|
sender = irc.pseudoclient.uid
|
||||||
irc.kick(sender, channel, targetu, reason)
|
irc.kick(sender, channel, targetu, reason)
|
||||||
irc.reply("Done.")
|
irc.reply("Done.")
|
||||||
irc.call_hooks([sender, 'CHANCMDS_KICK', {'channel': channel, 'target': targetu,
|
irc.call_hooks([sender, 'OPERCMDS_KICK', {'channel': channel, 'target': targetu,
|
||||||
'text': reason, 'parse_as': 'KICK'}])
|
'text': reason, 'parse_as': 'KICK'}])
|
||||||
|
|
||||||
@utils.add_cmd
|
@utils.add_cmd
|
||||||
@ -249,7 +249,7 @@ def kill(irc, source, args):
|
|||||||
reason = "Killed (%s (%s))" % (irc.get_friendly_name(sender), reason)
|
reason = "Killed (%s (%s))" % (irc.get_friendly_name(sender), reason)
|
||||||
|
|
||||||
irc.reply("Done.")
|
irc.reply("Done.")
|
||||||
irc.call_hooks([sender, 'CHANCMDS_KILL', {'target': targetu, 'text': reason,
|
irc.call_hooks([sender, 'OPERCMDS_KILL', {'target': targetu, 'text': reason,
|
||||||
'userdata': userdata, 'parse_as': 'KILL'}])
|
'userdata': userdata, 'parse_as': 'KILL'}])
|
||||||
|
|
||||||
@utils.add_cmd
|
@utils.add_cmd
|
||||||
@ -286,7 +286,7 @@ def mode(irc, source, args):
|
|||||||
irc.mode(irc.pseudoclient.uid, target, parsedmodes)
|
irc.mode(irc.pseudoclient.uid, target, parsedmodes)
|
||||||
|
|
||||||
# Call the appropriate hooks for plugins like relay.
|
# Call the appropriate hooks for plugins like relay.
|
||||||
irc.call_hooks([irc.pseudoclient.uid, 'OPERCMDS_MODEOVERRIDE',
|
irc.call_hooks([irc.pseudoclient.uid, 'OPERCMDS_MODE',
|
||||||
{'target': target, 'modes': parsedmodes, 'parse_as': 'MODE'}])
|
{'target': target, 'modes': parsedmodes, 'parse_as': 'MODE'}])
|
||||||
|
|
||||||
irc.reply("Done.")
|
irc.reply("Done.")
|
||||||
@ -311,7 +311,7 @@ def topic(irc, source, args):
|
|||||||
irc.topic(irc.pseudoclient.uid, channel, topic)
|
irc.topic(irc.pseudoclient.uid, channel, topic)
|
||||||
|
|
||||||
irc.reply("Done.")
|
irc.reply("Done.")
|
||||||
irc.call_hooks([irc.pseudoclient.uid, 'CHANCMDS_TOPIC',
|
irc.call_hooks([irc.pseudoclient.uid, 'OPERCMDS_TOPIC',
|
||||||
{'channel': channel, 'text': topic, 'setter': source,
|
{'channel': channel, 'text': topic, 'setter': source,
|
||||||
'parse_as': 'TOPIC'}])
|
'parse_as': 'TOPIC'}])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user