remove channel_op.py usage, specs cover it
This commit is contained in:
parent
ced3bb23da
commit
22e43013f8
1 changed files with 19 additions and 35 deletions
|
@ -48,8 +48,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.k", alias_of="kick")
|
@utils.hook("received.command.k", alias_of="kick")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "kick")
|
@utils.kwarg("require_access", "kick")
|
||||||
@utils.kwarg("usage", "<nickname> [reason]")
|
@utils.kwarg("help", "Kick a user from a channel")
|
||||||
@utils.spec("!r~channel !cuser ?string")
|
@utils.spec("!<#channel>r~channel !<nickname>cuser ?<reason>string")
|
||||||
def kick(self, event):
|
def kick(self, event):
|
||||||
self._kick(event["server"], event["target"], event["spec"][0],
|
self._kick(event["server"], event["target"], event["spec"][0],
|
||||||
event["spec"][1])
|
event["spec"][1])
|
||||||
|
@ -98,8 +98,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.b", alias_of="ban")
|
@utils.hook("received.command.b", alias_of="ban")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "ban")
|
@utils.kwarg("require_access", "ban")
|
||||||
@utils.kwarg("usage", "[+time] <target>")
|
@utils.spec("!<#channel>r~channel ?duration !<nickname>user|<mask>word")
|
||||||
@utils.spec("!r~channel ?time !user|word")
|
|
||||||
def ban(self, event):
|
def ban(self, event):
|
||||||
self._ban(event["server"], event["spec"][0], event["spec"][2], True,
|
self._ban(event["server"], event["spec"][0], event["spec"][2], True,
|
||||||
event["spec"][1], True)
|
event["spec"][1], True)
|
||||||
|
@ -107,8 +106,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.unban")
|
@utils.hook("received.command.unban")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "ban")
|
@utils.kwarg("require_access", "ban")
|
||||||
@utils.kwarg("usage", "<target>")
|
@utils.spec("!<#channel>r~channel !<nickname>user|<mask>word")
|
||||||
@utils.spec("!r~channel !user|word")
|
|
||||||
def unban(self, event):
|
def unban(self, event):
|
||||||
self._ban(event["server"], event["spec"][0], event["spec"][1],
|
self._ban(event["server"], event["spec"][0], event["spec"][1],
|
||||||
True, None, False)
|
True, None, False)
|
||||||
|
@ -117,8 +115,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.kb", alias_of="kickban")
|
@utils.hook("received.command.kb", alias_of="kickban")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "kickban")
|
@utils.kwarg("require_access", "kickban")
|
||||||
@utils.kwarg("usage", "[+time] <nickname> [reason]")
|
@utils.spec(
|
||||||
@utils.spec("!r~channel ?time !cuser| ?string")
|
"!<#channel>r~channel ?duration !<nickname>cuser| ?<reason>string")
|
||||||
def kickban(self, event):
|
def kickban(self, event):
|
||||||
self._ban(event["server"], event["spec"][0], event["spec"][2],
|
self._ban(event["server"], event["spec"][0], event["spec"][2],
|
||||||
False, event["spec"][1], True)
|
False, event["spec"][1], True)
|
||||||
|
@ -129,8 +127,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.up", alias_of="op")
|
@utils.hook("received.command.up", alias_of="op")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "op")
|
@utils.kwarg("require_access", "op")
|
||||||
@utils.kwarg("usage", "[nickname]")
|
@utils.spec("!<#channel>r~channel !<nickname>ruser")
|
||||||
@utils.spec("!r~channel !ruser")
|
|
||||||
def op(self, event):
|
def op(self, event):
|
||||||
self._op(True, event["spec"])
|
self._op(True, event["spec"])
|
||||||
|
|
||||||
|
@ -138,8 +135,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.down", alias_of="deop")
|
@utils.hook("received.command.down", alias_of="deop")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "op")
|
@utils.kwarg("require_access", "op")
|
||||||
@utils.kwarg("usage", "[nickname]")
|
@utils.spec("!<#channel>r~channel !<nickname>ruser")
|
||||||
@utils.spec("!r~channel !ruser")
|
|
||||||
def deop(self, event):
|
def deop(self, event):
|
||||||
self._op(False, event["spec"])
|
self._op(False, event["spec"])
|
||||||
|
|
||||||
|
@ -150,8 +146,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.devoice")
|
@utils.hook("received.command.devoice")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "voice")
|
@utils.kwarg("require_access", "voice")
|
||||||
@utils.kwarg("usage", "[nickname]")
|
@utils.spec("!<#channel>r~channel !<nickname>ruser")
|
||||||
@utils.spec("!r~channel !ruser")
|
|
||||||
def voice(self, event):
|
def voice(self, event):
|
||||||
add = event["command"] == "voice"
|
add = event["command"] == "voice"
|
||||||
event["spec"][0].send_mode("+v" if add else "-v", [event["spec"][1]])
|
event["spec"][0].send_mode("+v" if add else "-v", [event["spec"][1]])
|
||||||
|
@ -160,8 +155,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "topic")
|
@utils.kwarg("require_access", "topic")
|
||||||
@utils.kwarg("remove_empty", False)
|
@utils.kwarg("remove_empty", False)
|
||||||
@utils.kwarg("usage", "<topic>")
|
@utils.spec("!<#channel>r~channel !<topic>string")
|
||||||
@utils.spec("!r~channel !string")
|
|
||||||
def topic(self, event):
|
def topic(self, event):
|
||||||
event["spec"][0].send_topic(event["spec"][1])
|
event["spec"][0].send_topic(event["spec"][1])
|
||||||
|
|
||||||
|
@ -169,8 +163,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "topic")
|
@utils.kwarg("require_access", "topic")
|
||||||
@utils.kwarg("remove_empty", False)
|
@utils.kwarg("remove_empty", False)
|
||||||
@utils.kwarg("usage", "<topic>")
|
@utils.spec("!<#channel>r~channel !<topic>string")
|
||||||
@utils.spec("!r~channel !string")
|
|
||||||
def tappend(self, event):
|
def tappend(self, event):
|
||||||
event["spec"][0].send_topic(event["spec"][0].topic + event["spec"][1])
|
event["spec"][0].send_topic(event["spec"][0].topic + event["spec"][1])
|
||||||
|
|
||||||
|
@ -192,8 +185,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "quiet")
|
@utils.kwarg("require_access", "quiet")
|
||||||
@utils.kwarg("help", "Quiet a given user")
|
@utils.kwarg("help", "Quiet a given user")
|
||||||
@utils.kwarg("usage", "[+time] <nickname>")
|
@utils.spec("!<#channel>r~channel ?duration !<nickname>user|<mask>word")
|
||||||
@utils.spec("!r~channel ?time !user|word")
|
|
||||||
def quiet(self, event):
|
def quiet(self, event):
|
||||||
self._quiet(event["server"], True, event["spec"])
|
self._quiet(event["server"], True, event["spec"])
|
||||||
|
|
||||||
|
@ -202,8 +194,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "unquiet")
|
@utils.kwarg("require_access", "unquiet")
|
||||||
@utils.kwarg("help", "Unquiet a given user")
|
@utils.kwarg("help", "Unquiet a given user")
|
||||||
@utils.kwarg("usage", "<nickname>")
|
@utils.spec("!<#channel>r~channel !<nickname>user|<mask>word")
|
||||||
@utils.spec("!r~channel !user|word")
|
|
||||||
def unquiet(self, event):
|
def unquiet(self, event):
|
||||||
self._quiet(event["server"], False, event["spec"])
|
self._quiet(event["server"], False, event["spec"])
|
||||||
|
|
||||||
|
@ -238,8 +229,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "invite")
|
@utils.kwarg("require_access", "invite")
|
||||||
@utils.kwarg("help", "Invite a given user")
|
@utils.kwarg("help", "Invite a given user")
|
||||||
@utils.kwarg("usage", "<nickname>")
|
@utils.spec("!<#channel>r~channel !<nickname>word")
|
||||||
@utils.spec("!r~channel !word")
|
|
||||||
def invite(self, event):
|
def invite(self, event):
|
||||||
user_nickname = event["args_split"][0]
|
user_nickname = event["args_split"][0]
|
||||||
|
|
||||||
|
@ -263,8 +253,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("help", "Configure access flags for a given user")
|
@utils.kwarg("help", "Configure access flags for a given user")
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "flags")
|
@utils.kwarg("require_access", "flags")
|
||||||
@utils.kwarg("usage", "<nickname> [flags]")
|
@utils.spec("!<#channel>r~channel !<nickname>ouser ?<flags>word")
|
||||||
@utils.spec("!r~channel !ouser ?string")
|
|
||||||
def flags(self, event):
|
def flags(self, event):
|
||||||
target = event["spec"][1]
|
target = event["spec"][1]
|
||||||
current_flags = event["spec"][0].get_user_setting(target.get_id(),
|
current_flags = event["spec"][0].get_user_setting(target.get_id(),
|
||||||
|
@ -354,8 +343,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "cmute")
|
@utils.kwarg("require_access", "cmute")
|
||||||
@utils.kwarg("help", "Mute the current channel")
|
@utils.kwarg("help", "Mute the current channel")
|
||||||
@utils.kwarg("usage", "[+time]")
|
@utils.spec("!<#channel>r~channel ?duration")
|
||||||
@utils.spec("!r~channel ?time")
|
|
||||||
def cmute(self, event):
|
def cmute(self, event):
|
||||||
event["spec"][0].send_mode("+m")
|
event["spec"][0].send_mode("+m")
|
||||||
|
|
||||||
|
@ -373,7 +361,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "cmute")
|
@utils.kwarg("require_access", "cmute")
|
||||||
@utils.kwarg("help", "Mute the current channel")
|
@utils.kwarg("help", "Mute the current channel")
|
||||||
@utils.spec("!r~channel")
|
@utils.spec("!<#channel>r~channel")
|
||||||
def cunmute(self, event):
|
def cunmute(self, event):
|
||||||
self._cunmute(event["spec"][0])
|
self._cunmute(event["spec"][0])
|
||||||
|
|
||||||
|
@ -419,9 +407,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "clear")
|
@utils.kwarg("require_access", "clear")
|
||||||
@utils.kwarg("help", "Clear a given channel list mode (e.g. +b)")
|
@utils.kwarg("help", "Clear a given channel list mode (e.g. +b)")
|
||||||
@utils.kwarg("usage", "<type> [mask]")
|
@utils.spec("!<#channel>r~channel !<type>word|<mode>word ?<mask>word")
|
||||||
@utils.kwarg("usage", "+<mode> [mask]")
|
|
||||||
@utils.spec("!r~channel !word ?word")
|
|
||||||
def clear(self, event):
|
def clear(self, event):
|
||||||
mode, mode_list = self._list_query_event(
|
mode, mode_list = self._list_query_event(
|
||||||
event["server"], event["spec"][0], event["spec"][1],
|
event["server"], event["spec"][0], event["spec"][1],
|
||||||
|
@ -435,9 +421,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("require_mode", "o")
|
@utils.kwarg("require_mode", "o")
|
||||||
@utils.kwarg("require_access", "lsearch")
|
@utils.kwarg("require_access", "lsearch")
|
||||||
@utils.kwarg("help", "Search a given channel list mode (e.g. +b)")
|
@utils.kwarg("help", "Search a given channel list mode (e.g. +b)")
|
||||||
@utils.kwarg("usage", "<type> [mask]")
|
@utils.spec("!<#channel>r~channel !<type>word|<mode>word ?<mask>word")
|
||||||
@utils.kwarg("usage", "+<mode> [mask]")
|
|
||||||
@utils.spec("!r~channel !word ?word")
|
|
||||||
def lsearch(self, event):
|
def lsearch(self, event):
|
||||||
mode, mode_list = self._list_query_event(
|
mode, mode_list = self._list_query_event(
|
||||||
event["server"], event["spec"][0], event["spec"][1],
|
event["server"], event["spec"][0], event["spec"][1],
|
||||||
|
|
Loading…
Reference in a new issue