Network: add all+server+channels and all+channels commands (#1305)

* Network: add all+server+channels and all+channels commands

* Network: fix up commands for PR as per @GLolol

* Network: fix syntax docs, style, use irc.state.channels, not its keys

* move acmd to Admin, remove cmdallchans, can be used by 'cmdall acmd ...'
This commit is contained in:
Ken Spencer 2017-09-23 09:51:00 -04:00 committed by Valentin Lorentz
parent 5e880fd73d
commit ca037a94c5
2 changed files with 12 additions and 2 deletions

View File

@ -350,6 +350,16 @@ class Admin(callbacks.Plugin):
irc.replySuccess()
clearq = wrap(clearq)
def acmd(self, irc, msg, args, commandAndArgs):
"""<command> [<arg> ...]
Perform <command> (with associated <arg>s on all channels on current network."""
for channel in irc.state.channels:
msg.args[0] = channel
self.Proxy(irc, msg, commandAndArgs)
acmd = wrap(acmd, ['admin', many('something')])
Class = Admin

View File

@ -157,7 +157,7 @@ class Network(callbacks.Plugin):
command = wrap(command, ['admin', ('networkIrc', True), many('something')])
def cmdall(self, irc, msg, args, commandAndArgs):
"""<command> <args>...
"""<command> [<arg> ...]
Perform <command> (with its associated <arg>s) on all networks.
"""
@ -165,7 +165,7 @@ class Network(callbacks.Plugin):
for ircd in ircs:
self.Proxy(ircd, msg, commandAndArgs)
cmdall = wrap(cmdall, ['admin', many('something')])
###
# whois command-related stuff.
###