X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/d3417a2c52f8566a741f75f7744aa1de935d92ce..52e1dab311754ecea2966e974507605c69fe321d:/modules/control.py diff --git a/modules/control.py b/modules/control.py index 29b3da6..bd2460c 100644 --- a/modules/control.py +++ b/modules/control.py @@ -99,11 +99,15 @@ def _whois(user, chan, showglevel=True, showclevel=True): fmt += " (not a channel user)" return fmt % fillers -@lib.hook(needchan=False) -@lib.help("", "shows who someone is") +@lib.hook(needchan=False, wantchan=True) +@lib.help("", "shows who someone is") @lib.argsEQ(1) def whois(bot, user, chan, realtarget, *args): - target = bot.parent.user(args[0], create=False) + name = args[0] + if name.startswith("#"): + target = bot.parent.User(name, name[1:]) + else: + target = bot.parent.user(name, create=False) if target is None: bot.msg(user, "I don't know %s." % (args[0])) else: