diff --git a/Bantracker/config.py b/Bantracker/config.py index be86a81..5692d26 100644 --- a/Bantracker/config.py +++ b/Bantracker/config.py @@ -26,19 +26,18 @@ conf.registerGlobalValue(conf.supybot.plugins.Bantracker, 'database', conf.registerGlobalValue(conf.supybot.plugins.Bantracker, 'bansite', registry.String('', "Web site for the bantracker, without the 'bans.cgi' appended", private=True)) -conf.registerChannelValue(Bantracker, 'dontRequestComment', +conf.registerGroup(Bantracker, 'commentRequest') +conf.registerChannelValue(Bantracker.commentRequest, 'ignore', registry.SpaceSeparatedListOfStrings([], "List of nicks for which the bot won't request to comment a ban/quiet/removal."\ " Is case insensible and wildcards * ? are accepted.")) - -conf.registerChannelValue(Bantracker, 'forwardRequest', +conf.registerChannelValue(Bantracker.commentRequest, 'forward', registry.SpaceSeparatedListOfStrings([], - "List of nicks for which the bot will forward the comment request to"\ - " the channels/nicks defined in forwardChannel option."\ + "List of nicks for which the bot will forward the request to"\ + " the channels/nicks defined in forwards.channels option."\ " Is case insensible and wildcards * ? are accepted.")) - -conf.registerChannelValue(Bantracker, 'forwardChannels', +conf.registerChannelValue(Bantracker.commentRequest.forward, 'channels', registry.SpaceSeparatedListOfStrings([], - "List of channels/nicks to forward comment request if the op that set the ban/quiet"\ - " is in the forwardRequest list.")) + "List of channels/nicks to forward the request if the op that set the ban/quiet"\ + " is in the forward list.")) diff --git a/Bantracker/plugin.py b/Bantracker/plugin.py index 9f551d3..1c5ecdd 100644 --- a/Bantracker/plugin.py +++ b/Bantracker/plugin.py @@ -339,7 +339,7 @@ class Bantracker(callbacks.Plugin): def requestComment(self, irc, channel, ban, type=None): # check if we should request a comment - if nickMatch(ban.who, self.registryValue('dontRequestComment', channel=channel)): + if nickMatch(ban.who, self.registryValue('commentRequest.ignore', channel=channel)): return # check the type of the action taken mask = ban.mask @@ -354,8 +354,8 @@ class Bantracker(callbacks.Plugin): # send msg prefix = conf.supybot.reply.whenAddressedBy.chars()[0] # check to who send the request - if nickMatch(ban.who, self.registryValue('forwardRequest', channel=channel)): - channels = self.registryValue('forwardChannels', channel=channel) + if nickMatch(ban.who, self.registryValue('commentRequest.forward', channel=channel)): + channels = self.registryValue('commentRequest.forward.channels', channel=channel) if channels: s = "Please comment on the %s of %s in %s done by %s, use: %scomment %s " \ %(type, mask, channel, ban.who, prefix, ban.id)