little refactoring and tweaks
conf.supybot.plugins.Bantracker => Bantracker (this is sorter)
This commit is contained in:
@ -19,11 +19,11 @@ def configure(advanced):
|
||||
conf.registerPlugin('Bantracker', True)
|
||||
|
||||
Bantracker = conf.registerPlugin('Bantracker')
|
||||
conf.registerChannelValue(conf.supybot.plugins.Bantracker, 'enabled',
|
||||
conf.registerChannelValue(Bantracker, 'enabled',
|
||||
registry.Boolean(False, """Enable the bantracker"""))
|
||||
conf.registerGlobalValue(conf.supybot.plugins.Bantracker, 'database',
|
||||
conf.registerGlobalValue(Bantracker, 'database',
|
||||
registry.String('', "Filename of the bans database", private=True))
|
||||
conf.registerGlobalValue(conf.supybot.plugins.Bantracker, 'bansite',
|
||||
conf.registerGlobalValue(Bantracker, 'bansite',
|
||||
registry.String('', "Web site for the bantracker, without the 'bans.cgi' appended", private=True))
|
||||
|
||||
conf.registerGroup(Bantracker, 'commentRequest')
|
||||
|
@ -352,13 +352,13 @@ class Bantracker(callbacks.Plugin):
|
||||
else:
|
||||
type = 'removal'
|
||||
# send msg
|
||||
prefix = conf.supybot.reply.whenAddressedBy.chars()[0]
|
||||
prefix = conf.supybot.reply.whenAddressedBy.chars()[0] # prefix char for commands
|
||||
# check to who send the request
|
||||
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 <comment>" \
|
||||
%(type, mask, channel, ban.who, prefix, ban.id)
|
||||
s = "Please somebody comment on the %s of %s in %s done by %s, use:"\
|
||||
" %scomment %s <comment>" %(type, mask, channel, ban.who, prefix, ban.id)
|
||||
for chan in channels:
|
||||
msg = ircmsgs.notice(chan, s)
|
||||
irc.queueMsg(msg)
|
||||
|
Reference in New Issue
Block a user