@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):
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
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
}
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>")