]> jfr.im git - erebus.git/commitdiff
control - add aliases
authorzonidjan <redacted>
Thu, 5 Oct 2017 02:00:54 +0000 (21:00 -0500)
committerzonidjan <redacted>
Thu, 5 Oct 2017 02:00:54 +0000 (21:00 -0500)
modules/control.py

index bd2460cf823a0264d7e54caba92883f259b05657..c4caaf3089052f3303c46f6112d226e65460012e 100644 (file)
@@ -113,7 +113,7 @@ def whois(bot, user, chan, realtarget, *args):
        else:
                bot.msg(user, "%s is %s" % (args[0], _whois(target, chan, (user.glevel >= 1), (chan is not None and chan.levelof(user.auth) >= 1))))
 
        else:
                bot.msg(user, "%s is %s" % (args[0], _whois(target, chan, (user.glevel >= 1), (chan is not None and chan.levelof(user.auth) >= 1))))
 
-@lib.hook(needchan=False)
+@lib.hook(needchan=False, wantchan=True)
 @lib.help(None, "shows who you are")
 def whoami(bot, user, chan, realtarget, *args):
        bot.msg(user, "You are %s" % (_whois(user, chan)))
 @lib.help(None, "shows who you are")
 def whoami(bot, user, chan, realtarget, *args):
        bot.msg(user, "You are %s" % (_whois(user, chan)))
@@ -130,7 +130,7 @@ def qstat(bot, user, chan, realtarget, *args):
        bot.fastmsg(user, "Regular: %d -- Slow: %d" % (len(bot.msgqueue), len(bot.slowmsgqueue)))
 
 @lib.hook(needchan=False, glevel=lib.ADMIN)
        bot.fastmsg(user, "Regular: %d -- Slow: %d" % (len(bot.msgqueue), len(bot.slowmsgqueue)))
 
 @lib.hook(needchan=False, glevel=lib.ADMIN)
-@lib.help("[regular|slow]", "clears both or a specific msgqueue")
+@lib.help(('qclear','clearq','clearqueue'), "[regular|slow]", "clears both or a specific msgqueue")
 def qclear(bot, user, chan, realtarget, *args):
        if len(args) == 0:
                bot.msgqueue = deque()
 def qclear(bot, user, chan, realtarget, *args):
        if len(args) == 0:
                bot.msgqueue = deque()