X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/4477123de1254afa80243f7f9eab62c5cbf7b786..b68479d779c98ec06a1d66290dba8d98fb40f068:/modules/chanops.py diff --git a/modules/chanops.py b/modules/chanops.py index e2c1403..c4310f8 100644 --- a/modules/chanops.py +++ b/modules/chanops.py @@ -50,12 +50,17 @@ def kick(bot, user, chan, realtarget, *args): bot.msg(user, "Done. Kicked %d people." % (number)) @lib.hook(None, clevel=lib.OP) -@lib.help(" []", "kick all using the auth of ") +@lib.help(" []", "kick all using the auth of ") @lib.argsGE(1) def kickall(bot, user, chan, realtarget, *args): - auth = bot.parent.user(args[0]).auth + target = args[0] + if target[0] == "#" and len(target) > 1: + auth = target[1:] + else: + auth = bot.parent.user(args[0]).auth + if auth is not None: - number = _kick(bot, user, chan, realtarget, "#"+bot.parent.user(args[0]).auth, *args[1:]) + number = _kick(bot, user, chan, realtarget, "#"+auth, *args[1:]) bot.msg(user, "Done. Kicked %d people." % (number)) else: bot.msg(user, "I don't know that person's auth.")