From ddc2149e16bcf4f1982e26f8813a4b63c0ec8f37 Mon Sep 17 00:00:00 2001 From: Tanner Date: Thu, 12 Jun 2014 21:26:10 -0500 Subject: [PATCH] Improve text, add triviaadmin to authweb Test improved includes the authweb command description and error, along with the error when using .next via message. --- plugin.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin.py b/plugin.py index 3c5a4f3..5413a33 100644 --- a/plugin.py +++ b/plugin.py @@ -405,7 +405,7 @@ class TriviaTime(callbacks.Plugin): def authweb(self, irc, msg, arg): """ - Triviamods only. Register for web access + This registers triviamods and triviaadmins on the website. Use this command again if the account password has changed. """ username = user.name channel = msg.args[0] @@ -415,10 +415,12 @@ class TriviaTime(callbacks.Plugin): capability = 'triviamod' elif user.capabilities.check('owner'): capability = 'owner' + elif user.capabilities.check('{0},triviaadmin'.format(channel)): + capability = 'triviaadmin' else: raise KeyError except KeyError: - irc.error('Sorry, you must be at least a triviamod to register for web login') + irc.error('Sorry, you must be a triviamod, triviaadmin, or owner to use this command.') return @@ -782,7 +784,7 @@ class TriviaTime(callbacks.Plugin): pass if not irc.isChannel(channel): - irc.error('This command can only be used in a channel.') + irc.error('Please use this command in a channel.') return minStreak = self.registryValue('general.nextMinStreak', channel)