Rbls: Add supybot.plugins.Rbls.enable.
parent
f7b83e05f7
commit
823f49770c
|
@ -53,6 +53,9 @@ Rbls = conf.registerPlugin('Rbls')
|
|||
# This is where your configuration variables (if any) should go. For example:
|
||||
# conf.registerGlobalValue(Rbls, 'someConfigVariableName',
|
||||
# registry.Boolean(False, _("""Help for someConfigVariableName.""")))
|
||||
conf.registerChannelValue(Rbls, 'enable',
|
||||
registry.Boolean(False, _("""Determines whether or not this plugin will
|
||||
kickban users blacklisted with Rbls.""")))
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||
|
|
|
@ -49,6 +49,8 @@ class Rbls(callbacks.Plugin):
|
|||
|
||||
def doJoin(self, irc, msg):
|
||||
channel = msg.args[0]
|
||||
if not self.registryValue('enable', channel):
|
||||
return
|
||||
nick, ident, host = ircutils.splitHostmask(msg.prefix)
|
||||
|
||||
fd = utils.web.getUrlFd('http://rbls.org/%s' % host)
|
||||
|
|
|
@ -32,6 +32,7 @@ from supybot.test import *
|
|||
|
||||
class RblsTestCase(ChannelPluginTestCase):
|
||||
plugins = ('Rbls',)
|
||||
config = {'supybot.plugins.Rbls.enable': 'True'}
|
||||
|
||||
if network:
|
||||
def testBan(self):
|
||||
|
|
Loading…
Reference in New Issue