config help review

This commit is contained in:
Elián Hanisch 2010-04-03 23:53:05 -03:00
parent ca60ba5aa2
commit b6887f5ede

View File

@ -15,10 +15,12 @@
import supybot.conf as conf import supybot.conf as conf
import supybot.registry as registry import supybot.registry as registry
class ValidTypes(registry.OnlySomeStrings): class ValidTypes(registry.OnlySomeStrings):
"""Invalid type, valid types are: 'removal', 'ban' or 'quiet'.""" """Invalid type, valid types are: 'removal', 'ban' or 'quiet'."""
validStrings = ('removal', 'ban', 'quiet') validStrings = ('removal', 'ban', 'quiet')
class SpaceSeparatedListOfTypes(registry.SpaceSeparatedListOf): class SpaceSeparatedListOfTypes(registry.SpaceSeparatedListOf):
Value = ValidTypes Value = ValidTypes
@ -42,7 +44,7 @@ conf.registerChannelValue(Bantracker.request, 'type',
"List of events for which the bot should request a comment.")) "List of events for which the bot should request a comment."))
conf.registerChannelValue(Bantracker.request, 'ignore', conf.registerChannelValue(Bantracker.request, 'ignore',
registry.SpaceSeparatedListOfStrings(['FloodBot?', 'FloodBotK?', 'ChanServ'], registry.SpaceSeparatedListOfStrings(['FloodBot?', 'FloodBotK?', 'ChanServ'],
"List of nicks for which the bot won't request to comment a ban/quiet/removal."\ "List of nicks for which the bot won't request to comment or review."\
" Is case insensible and wildcards * ? are accepted.")) " Is case insensible and wildcards * ? are accepted."))
conf.registerChannelValue(Bantracker.request, 'forward', conf.registerChannelValue(Bantracker.request, 'forward',
registry.SpaceSeparatedListOfStrings([], registry.SpaceSeparatedListOfStrings([],
@ -51,10 +53,10 @@ conf.registerChannelValue(Bantracker.request, 'forward',
" Is case insensible and wildcards * ? are accepted.")) " Is case insensible and wildcards * ? are accepted."))
conf.registerChannelValue(Bantracker.request.forward, 'channels', conf.registerChannelValue(Bantracker.request.forward, 'channels',
registry.SpaceSeparatedListOfStrings([], registry.SpaceSeparatedListOfStrings([],
"List of channels/nicks to forward the request if the op that set the ban/quiet"\ "List of channels/nicks to forward the request if the op is in the forward list."))
" is in the forward list."))
conf.registerGlobalValue(Bantracker.request, 'review', conf.registerGlobalValue(Bantracker.request, 'review',
registry.Float(7, registry.Float(7,
"Days after which the bot will request for review a ban. Can be an integer or decimal value.")) "Days after which the bot will request for review a ban. Can be an integer or decimal"
" value. Zero disables reviews."))