]> jfr.im git - erebus.git/blobdiff - modules/chanops.py
further py3 compatibility work
[erebus.git] / modules / chanops.py
index 984815c8734b15250e5bc5bbc86d908b532a7268..654c45ce8cd00aa05a81643113b3521055faea12 100644 (file)
@@ -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': [0],
        'depends': [],
        'softdeps': ['help'],
 }
@@ -25,12 +25,9 @@ import ctlmod
 def module(name):
        return lib.mod(name)
 
-@lib.hook(None, clevel=lib.OP)
-@lib.help("<nick|#auth> [<reason>]", "kick <nick>, 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("[<nick>] [...]", "")
+@lib.help("[<nick>] [...]", "voices yourself or <nick>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("[<nick>] [...]", "")
+@lib.help("[<nick>] [...]", "devoices yourself or <nick>s")
 def devoice(bot, user, chan, realtarget, *args):
        if len(args) == 0: args = (user.nick,)
        _mode(bot, chan, "-", "v", args)