]> jfr.im git - erebus.git/commitdiff
bugfixes
authorzonidjan <redacted>
Wed, 11 Oct 2017 02:16:29 +0000 (21:16 -0500)
committerzonidjan <redacted>
Wed, 11 Oct 2017 02:16:29 +0000 (21:16 -0500)
modules/trivia.py
modules/userinfo.py
modules/weather.py

index c2aea431d30c7df1505420d9870a11182021e63d..1f949bd7aa22e4c0950b039a873af1c0bc4c035d 100644 (file)
@@ -838,7 +838,8 @@ def triviahelp(bot, user, chan, realtarget, *args):
 @lib.hooknum(417)
 def num_417(bot, textline):
 #      bot.fastmsg(state.db['chan'], "Whoops, it looks like that question didn't quite go through! (E:417). Let's try another...")
-       state.nextquestion(qskipped=False, skipwait=True)
+       if state.curq is not None:
+               state.nextquestion(qskipped=False, skipwait=True)
 
 @lib.hooknum(332)
 def num_TOPIC(bot, textline):
index 03545a606241ffb7aa936600bf23be02365b278b..74a70e2909931e82805f889126742a57cab7f00d 100644 (file)
@@ -54,11 +54,13 @@ def getauth(thing):
 def _keys(user):
        return list(set(db.get(getauth(user), {}).keys() + db.get(str(user).lower(), {}).keys())) #list-to-set-to-list to remove duplicates
 def _has(user, key):
+       key = key.lower()
        return (
                key in db.get(getauth(user), {}) or
                key in db.get(str(user).lower(), {})
        )
 def _get(user, key, default=None):
+       key = key.lower()
        return (
                db.get(getauth(user), {}). #try to get the auth
                        get(key, #try to get the info-key by auth
@@ -67,6 +69,7 @@ def _get(user, key, default=None):
                                default #otherwise throw out whatever default
        )))
 def _set(user, key, value):
+       key = key.lower()
        if getauth(user) is not None:
                db.setdefault(getauth(user), {})[key] = value #use auth if we can
        db.setdefault(str(user).lower(), {})[key] = value #but set nick too
index 3f5879aaa61831d9f513c85ae17ed6090d9403e6..2249abacfba44bb576cd85e20d06ddccdfb39c9a 100644 (file)
@@ -50,4 +50,4 @@ def weather(bot, user, chan, realtarget, *args):
                }
                bot.msg(chan, output)
        else:
-               bot.msg(chan, "I don't know where to look!")
+               bot.msg(chan, "I don't know where to look! Try SETINFO LOCATION <your location>")