X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/535c2460e616cd4b5d3cc5e5ba6581b86f4d30ff..e6b601930f87d83511f1af144d2ad40ea3162e17:/modules/chanops.py diff --git a/modules/chanops.py b/modules/chanops.py index 984815c..bf73449 100644 --- a/modules/chanops.py +++ b/modules/chanops.py @@ -1,12 +1,12 @@ # Erebus IRC bot - Author: Erebus Team -# !EVAL and !EXEC commands +# chanop commands # This file is released into the public domain; see http://unlicense.org/ # module info modinfo = { 'author': 'Erebus Team', 'license': 'public domain', - 'compatible': [1,2], + 'compatible': [2], 'depends': [], 'softdeps': ['help'], } @@ -25,12 +25,9 @@ import ctlmod def module(name): return lib.mod(name) -@lib.hook(None, clevel=lib.OP) -@lib.help(" []", "kick , or all using <#auth>") -@lib.argsGE(1) def _kick(bot, user, chan, realtarget, *args): people = [] - if args[0][0] == "#": + if args[0].startswith("#"): people = bot.parent.getuserbyauth(args[0][1:]) else: people = [args[0]] @@ -90,14 +87,14 @@ def deop(bot, user, chan, realtarget, *args): bot.msg(user, "Deopped.") @lib.hook(None, clevel=lib.OP) -@lib.help("[] [...]", "") +@lib.help("[] [...]", "voices yourself or s") def voice(bot, user, chan, realtarget, *args): if len(args) == 0: args = (user.nick,) _mode(bot, chan, "+", "v", args) bot.msg(user, "Voiced.") @lib.hook(None, clevel=lib.OP) -@lib.help("[] [...]", "") +@lib.help("[] [...]", "devoices yourself or s") def devoice(bot, user, chan, realtarget, *args): if len(args) == 0: args = (user.nick,) _mode(bot, chan, "-", "v", args)