X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/363febf1fa2ed7eed3970d52af6844f294441aee..f5aec86546a7762dd0202f3983de22fe1c3814e9:/modules/userinfo.py?ds=sidebyside diff --git a/modules/userinfo.py b/modules/userinfo.py index bd15053..03545a6 100644 --- a/modules/userinfo.py +++ b/modules/userinfo.py @@ -6,7 +6,7 @@ modinfo = { 'author': 'Erebus Team', 'license': 'public domain', - 'compatible': [1,2], + 'compatible': [2], 'depends': [], 'softdeps': ['help'], } @@ -72,10 +72,10 @@ def _set(user, key, value): db.setdefault(str(user).lower(), {})[key] = value #but set nick too #commands -@lib.hook(needchan=False) +@lib.hook(needchan=False, wantchan=True) @lib.help("[]", "lists info items known about someone", " may be a nick, or an auth in format '#auth'", "it defaults to yourself") def getitems(bot, user, chan, realtarget, *args): - if chan is not None and realtarget == chan.name: replyto = chan + if chan is not None: replyto = chan else: replyto = user if len(args) > 0: @@ -85,11 +85,11 @@ def getitems(bot, user, chan, realtarget, *args): bot.msg(replyto, "%(user)s: %(target)s has the following info items: %(items)s" % {'user':user,'target':target,'items':(', '.join(_keys(target)))}) -@lib.hook(needchan=False) +@lib.hook(needchan=False, wantchan=True) @lib.help("[] ", "gets an info item about someone", " may be a nick, or an auth in format '#auth'", "it defaults to yourself") @lib.argsGE(1) def getinfo(bot, user, chan, realtarget, *args): - if chan is not None and realtarget == chan.name: replyto = chan + if chan is not None: replyto = chan else: replyto = user if len(args) > 1: