modinfo = {
'author': 'Erebus Team',
'license': 'public domain',
- 'compatible': [1,2],
+ 'compatible': [2],
'depends': ['userinfo'],
'softdeps': ['help'],
}
bot.msg(chan, "\00312%s\003 got an extra point for getting it before the hints! New score: %d." % (user, state.addpoint(user)))
state.nextquestion()
-@lib.hook(glevel=1, needchan=False)
+@lib.hook(glevel=1, needchan=False, wantchan=True)
@lib.help(None, "saves the trivia database")
def save(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 state.savedb():
else:
bot.msg(replyto, "Save failed!")
-@lib.hook(needchan=False)
+@lib.hook(needchan=False, wantchan=True)
@lib.help("[<user>]", "shows how many points you or someone has")
def points(bot, user, chan, realtarget, *args):
- if chan is not None and realtarget == chan.name: replyto = chan
+ if chan is not None: eplyto = chan
else: replyto = user
if len(args) != 0: who = args[0]
def skip(bot, user, chan, realtarget, *args):
state.nextquestion(qskipped=True, skipwait=True)
-@lib.hook(needchan=False)
+@lib.hook(needchan=False, wantchan=True)
@lib.help(None, "starts the trivia game")
def start(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 chan is not None and chan.name != state.db['chan']:
except:
bot.msg(user, "Failed!")
-@lib.hook(needchan=False)
+@lib.hook(needchan=False, wantchan=True)
@lib.help("[<user>]", "shows you or someone else's rank")
def rank(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: who = args[0]