X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/5ed70e948f881ad7486c0aba588dd46c60ad5b36..e6b601930f87d83511f1af144d2ad40ea3162e17:/modules/trivia.py diff --git a/modules/trivia.py b/modules/trivia.py index cf75c8c..c2aea43 100644 --- a/modules/trivia.py +++ b/modules/trivia.py @@ -298,7 +298,7 @@ class TriviaState(object): nextqid = None nextq = specialQuestion(nextq) - if len(nextq) > 2 and nextq[2] - time.time() < 7*24*60*60 and iteration < 10: + if len(nextq) > 2 and time.time() - nextq[2] < 7*24*60*60 and iteration < 10: return self._nextquestion(iteration=iteration+1) #short-circuit to pick another question if len(nextq) > 2: nextq[2] = time.time() @@ -466,7 +466,7 @@ def setnextid(bot, user, chan, realtarget, *args): @lib.argsGE(1) def setnext(bot, user, chan, realtarget, *args): line = ' '.join([str(arg) for arg in args]) - linepieces = line.split('*') + linepieces = line.split('*', 1) if len(linepieces) < 2: bot.msg(user, "Error: need *") return @@ -752,7 +752,7 @@ def addq(bot, user, chan, realtarget, *args): questions = state.questions line = ' '.join([str(arg) for arg in args]) - linepieces = line.split('*') + linepieces = line.split('*', 1) if len(linepieces) < 2: bot.msg(user, "Error: need *") return