]> jfr.im git - erebus.git/commitdiff
add !AUTH command to do another WHO
authorzonidjan <redacted>
Thu, 8 Jun 2017 03:14:43 +0000 (22:14 -0500)
committerzonidjan <redacted>
Thu, 8 Jun 2017 03:14:43 +0000 (22:14 -0500)
bot.py
modules/control.py

diff --git a/bot.py b/bot.py
index 60b2e50db4b4d0141c96b55c52d8f18ed911cab2..3d34641f11295ae5bb9a14305dc897445a2e58c9 100644 (file)
--- a/bot.py
+++ b/bot.py
@@ -94,6 +94,8 @@ class Bot(object):
        def _got354(self, pieces):
                qt, nick, auth = pieces[3:6]
                self.parent.user(nick).authed(auth)
+               if qt == "2":
+                       self.msg(nick, "You are now known as #%s (access level: %s)" % (auth, self.parent.user(nick).glevel))
        def _gotjoin(self, pieces):
                nick = pieces[0].split('!')[0][1:]
                chan = self.parent.channel(pieces[2])
index cfc4ce643e837bde1ef52b787bfa49f56807c932..0584353afc38b9c82b247569f202d0b8ab521567 100644 (file)
@@ -68,7 +68,7 @@ def modreload(bot, user, chan, realtarget, *args):
 def modlist(bot, user, chan, realtarget, *args):
        mods = ctlmod.modules
        for mod in mods.itervalues():
-               bot.msg(user, "- %s %r" % (mod.__name__, mod))
+               bot.msg(user, "- %s (%s)" % (mod.__name__, mod.__file__))
        bot.msg(user, "Done.")
 
 def _whois(user, chan, showglevel=True, showclevel=True):
@@ -109,6 +109,12 @@ def whois(bot, user, chan, realtarget, *args):
 def whoami(bot, user, chan, realtarget, *args):
        bot.msg(user, "You are %s" % (_whois(user, chan)))
 
+@lib.hook(needchan=False)
+@lib.help(None, "tries to read your auth and access level again")
+def auth(bot, user, chan, realtarget, *args):
+       bot.msg(user, "Okay, give me a second.")
+       bot.conn.send("WHO %s n%%ant,2" % (user))
+
 @lib.hook(needchan=False, glevel=1)
 @lib.help(None, "displays length of each msgqueue")
 def qstat(bot, user, chan, realtarget, *args):