More crap gone

This commit is contained in:
Dennis Kaarsemaker 2007-09-17 20:38:37 +02:00
parent c000e64cff
commit 378cacceeb
5 changed files with 0 additions and 61 deletions

View File

@ -1 +0,0 @@
Insert a description of your plugin here, with any notes, etc. about using it.

View File

@ -1,21 +0,0 @@
"""
Various channel protections
"""
import supybot
import supybot.world as world
__version__ = "0.1"
__author__ = supybot.Author('Dennis Kaarsemaker', 'Seveas', 'dennis@kaarsemaker.net')
__contributors__ = {}
__url__ = 'http://bots.ubuntulinux.nl'
import config
reload(config)
import plugin
reload(plugin)
if world.testing:
import test
Class = plugin.Class
configure = config.configure

View File

@ -1,10 +0,0 @@
import supybot.conf as conf
import supybot.registry as registry
def configure(advanced):
from supybot.questions import expect, anything, something, yn
conf.registerPlugin('Changuard', True)
Changuard = conf.registerPlugin('Changuard')
conf.registerChannelValue(conf.supybot.plugins.Changuard, 'enabled',
registry.Boolean(False,"""Enable the guard plugin"""))

View File

@ -1,25 +0,0 @@
import supybot.utils as utils
from supybot.commands import *
import supybot.plugins as plugins
import supybot.ircutils as ircutils
import supybot.callbacks as callbacks
import supybot.ircmsgs as ircmsgs
class Changuard(callbacks.PluginRegexp):
"""Channel guard"""
regexps = ['theban','badwords']
def theban(self, irc, msg, match):
r"""((\S\S\S\S\S.*?)\2\2\2\2\2|nextpicturez)"""
if self.registryValue('enabled', msg.args[0]):
if msg.args[0][0] == "#":
irc.queueMsg(ircmsgs.IrcMsg(command='REMOVE', args=(msg.args[0], msg.nick, "No flooding please"), msg=msg))
irc.queueMsg(ircmsgs.ban(msg.args[0], '*!*@%s' % msg.host))
def badwords(self, irc, msg, match):
r"""http.*(sex|porn)"""
if self.registryValue('enabled', msg.args[0]):
if msg.args[0][0] == "#":
irc.queueMsg(ircmsgs.IrcMsg(command='REMOVE', args=(msg.args[0], msg.nick, "Watch your language!"), msg=msg))
Class = Changuard

View File

@ -1,4 +0,0 @@
from supybot.test import *
class ChanguardTestCase(PluginTestCase):
plugins = ('Changuard',)