Delete outdated plugin.

This commit is contained in:
oddluck 2020-07-21 03:01:29 +00:00
parent 5c3bbf2c7c
commit c06b8a56ff
10 changed files with 0 additions and 1364 deletions

View File

@ -1,3 +0,0 @@
This plugin ensures that the bot won't say or (optionally) respond to any words
the bot owner finds offensive. As an additional capability, it can (optionally)
kick users who use such words from channels that have that capability enabled.

View File

@ -1,74 +0,0 @@
###
# Copyright (c) 2005, Jeremiah Fincher
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
"""
BadWords: filters bad words on outgoing/incoming messages so the bot can't be
made to say bad words.
"""
import supybot
import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system.
__version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.authors.jemfinch
__maintainer__ = getattr(
supybot.authors,
"oddluck",
supybot.Author("oddluck", "oddluck", "oddluck@riseup.net"),
)
# This is a dictionary mapping supybot.Author instances to lists of
# contributions.
__contributors__ = {}
# This is a url where the most recent plugin package can be downloaded.
__url__ = "https://github.com/oddluck/limnoria-plugins/"
from . import config
from . import plugin
from imp import reload
reload(plugin) # In case we're being reloaded.
# Add more reloads here if you add third-party modules and want them to be
# reloaded when this plugin is reloaded. Don't forget to import them as well!
if world.testing:
from . import test
Class = plugin.Class
configure = config.configure
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:

View File

@ -1,197 +0,0 @@
###
# Copyright (c) 2005, Jeremiah Fincher
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
from __future__ import division
import time
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization("BadWords")
def configure(advanced):
from supybot.questions import output, expect, anything, something, yn
conf.registerPlugin("BadWords", True)
if yn(_("Would you like to add some bad words?")):
words = anything(_("What words? (separate individual words by spaces)"))
conf.supybot.plugins.BadWords.words.set(words)
class LastModifiedSetOfStrings(registry.SpaceSeparatedSetOfStrings):
lastModified = 0
def setValue(self, v):
self.lastModified = time.time()
registry.SpaceSeparatedListOfStrings.setValue(self, v)
BadWords = conf.registerPlugin("BadWords")
conf.registerGlobalValue(
BadWords,
"words",
LastModifiedSetOfStrings(
[],
_(
"""Determines what words are
considered to be 'bad' so the bot won't say them."""
),
),
)
conf.registerChannelValue(
BadWords,
"requireWordBoundaries",
registry.Boolean(
False,
_(
"""Determines whether the bot will require bad
words to be independent words, or whether it will censor them within other
words. For instance, if 'darn' is a bad word, then if this is true, 'darn'
will be censored, but 'darnit' will not. You probably want this to be
false. After changing this setting, the BadWords regexp needs to be
regenerated by adding/removing a word to the list, or reloading the
plugin."""
),
),
)
class String256(registry.String):
def __call__(self):
s = registry.String.__call__(self)
return s * (1024 // len(s))
def __str__(self):
return self.value
conf.registerGlobalValue(
BadWords,
"nastyChars",
String256(
"!@#&",
_(
"""Determines what characters will replace bad words; a
chunk of these characters matching the size of the replaced bad word will
be used to replace the bad words you've configured."""
),
),
)
class ReplacementMethods(registry.OnlySomeStrings):
validStrings = ("simple", "nastyCharacters")
conf.registerGlobalValue(
BadWords,
"replaceMethod",
ReplacementMethods(
"nastyCharacters",
_(
"""Determines the manner in which
bad words will be replaced. 'nastyCharacters' (the default) will replace a
bad word with the same number of 'nasty characters' (like those used in
comic books; configurable by supybot.plugins.BadWords.nastyChars).
'simple' will replace a bad word with a simple strings (regardless of the
length of the bad word); this string is configurable via
supybot.plugins.BadWords.simpleReplacement."""
),
),
)
conf.registerGlobalValue(
BadWords,
"simpleReplacement",
registry.String(
"[CENSORED]",
_(
"""Determines what word will replace bad
words if the replacement method is 'simple'."""
),
),
)
conf.registerGlobalValue(
BadWords,
"stripFormatting",
registry.Boolean(
True,
_(
"""Determines whether the bot will strip
formatting characters from messages before it checks them for bad words.
If this is False, it will be relatively trivial to circumvent this plugin's
filtering. If it's True, however, it will interact poorly with other
plugins that do coloring or bolding of text."""
),
),
)
conf.registerChannelValue(
BadWords,
"kick",
registry.Boolean(
False,
_(
"""Determines whether the bot will kick people with
a warning when they use bad words."""
),
),
)
conf.registerChannelValue(
BadWords.kick,
"message",
registry.NormalizedString(
_(
"""You have been kicked for using a word
prohibited in the presence of this bot. Please use more appropriate
language in the future."""
),
_(
"""Determines the kick message used by the
bot when kicking users for saying bad words."""
),
),
)
conf.registerChannelValue(
BadWords,
"inFilter",
registry.Boolean(
False,
_(
"""Determines whether the bot will not respond
to messages with badwords from untrusted users."""
),
),
)
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:

View File

@ -1,198 +0,0 @@
# Spanish translation for Limnoria
# Copyright (c) 2015 Limnoria Contributors 2015
# This file is distributed under the same license as the Limnoria package.
# Aaron Farias <timido@ubuntu.com>, 2015.
#
msgid ""
msgstr ""
"Project-Id-Version: limnoria\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-03-26 09:31+0000\n"
"PO-Revision-Date: 2015-01-02 19:15+0000\n"
"Last-Translator: Aaron Farias <Unknown>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2015-01-09 18:01+0000\n"
"X-Generator: Launchpad (build 17298)\n"
#: config.py:42
msgid "Would you like to add some bad words?"
msgstr "¿Te gustaría añadir alguna mala palabra?"
#: config.py:43
msgid "What words? (separate individual words by spaces)"
msgstr "¿Qué palabras? (palabras individuales separadas por espacios)"
#: config.py:55
msgid ""
"Determines what words are\n"
" considered to be 'bad' so the bot won't say them."
msgstr ""
"Determina qué palabras son\n"
"considera que es \"malo\" por lo que el bot no decirlas."
#: config.py:58
msgid ""
"Determines whether the bot will require bad\n"
" words to be independent words, or whether it will censor them within "
"other\n"
" words. For instance, if 'darn' is a bad word, then if this is true, "
"'darn'\n"
" will be censored, but 'darnit' will not. You probably want this to be\n"
" false. After changing this setting, the BadWords regexp needs to be\n"
" regenerated by adding/removing a word to the list, or reloading the\n"
" plugin."
msgstr ""
"Determina si el bot requerirá mal\n"
"palabras sean palabras independientes, o si se van a censurar dentro de "
"otra\n"
"palabras. Por ejemplo, si 'maldito' es una mala palabra, entonces si esto es "
"cierto, 'maldito'\n"
"serán censurados, pero 'darnit' no lo hará. Es probable que esta sea\n"
"falsa. Después de cambiar este ajuste, los badwords expresión regular tiene "
"que ser\n"
"regenerado por añadir/eliminar una palabra a la lista, o volver a cargar el\n"
"plugin."
#: config.py:75
msgid ""
"Determines what characters will replace bad words; a\n"
" chunk of these characters matching the size of the replaced bad word "
"will\n"
" be used to replace the bad words you've configured."
msgstr ""
"Determina qué caracteres reemplazarán malas palabras; un\n"
"parte de estos caracteres que coincida con el tamaño de la mala palabra "
"reemplazado voluntad\n"
"usarse para reemplazar las malas palabras que ha configurado."
#: config.py:83
msgid ""
"Determines the manner in which\n"
" bad words will be replaced. 'nastyCharacters' (the default) will "
"replace a\n"
" bad word with the same number of 'nasty characters' (like those used in\n"
" comic books; configurable by supybot.plugins.BadWords.nastyChars).\n"
" 'simple' will replace a bad word with a simple strings (regardless of "
"the\n"
" length of the bad word); this string is configurable via\n"
" supybot.plugins.BadWords.simpleReplacement."
msgstr ""
"Determina la manera en que\n"
"serán reemplazados malas palabras. 'NastyCharacters' (por defecto), "
"sustituirá a un\n"
"mala palabra con el mismo número de 'personajes desagradables' (como los "
"utilizados en\n"
"cómics; configurable por supybot.plugins.BadWords.nastyChars).\n"
"\"Simple\" reemplazará una mala palabra con un simple cuerdas "
"(independientemente de la\n"
"longitud de la mala palabra); esta cadena es configurable a través de\n"
"supybot.plugins.BadWords.simpleReplacement."
#: config.py:91
msgid ""
"Determines what word will replace bad\n"
" words if the replacement method is 'simple'."
msgstr ""
"Determina qué palabra reemplazará mal\n"
"es decir, si el método de sustitución es \"simple\"."
#: config.py:94
msgid ""
"Determines whether the bot will strip\n"
" formatting characters from messages before it checks them for bad "
"words.\n"
" If this is False, it will be relatively trivial to circumvent this "
"plugin's\n"
" filtering. If it's True, however, it will interact poorly with other\n"
" plugins that do coloring or bolding of text."
msgstr ""
"Determina si el bot se tira\n"
"caracteres de formato de los mensajes antes de que se les comprueba malas "
"palabras.\n"
"Si esto es falso, será relativamente trivial para eludir de este plugin\n"
"filtrado. Si es cierto, sin embargo, va a interactuar mal con otro\n"
"plugins que hacen coloración o la negrita del texto."
#: config.py:101
msgid ""
"Determines whether the bot will kick people with\n"
" a warning when they use bad words."
msgstr ""
"Determina si el bot se iniciará a las personas con\n"
"una advertencia cuando use malas palabras."
#: config.py:104
msgid ""
"You have been kicked for using a word\n"
" prohibited in the presence of this bot. Please use more appropriate\n"
" language in the future."
msgstr ""
"Has sido expulsado por usar una palabra\n"
"prohibido en la presencia de este robot. Por favor, use más apropiado\n"
"idioma en el futuro."
#: config.py:106
msgid ""
"Determines the kick message used by the\n"
" bot when kicking users for saying bad words."
msgstr ""
"Determina el mensaje patada utilizado por el\n"
"bot cuando patadas usuarios por decir malas palabras."
#: plugin.py:46
#, docstring
msgid ""
"Maintains a list of words that the bot is not allowed to say.\n"
" Can also be used to kick people that say these words, if the bot\n"
" has op."
msgstr ""
"Mantiene una lista de palabras que el bot no está permitido decir.\n"
"También se puede utilizar para echar a la gente que dicen estas palabras, si "
"el bot\n"
"tiene op."
#: plugin.py:115
#, docstring
msgid ""
"takes no arguments\n"
"\n"
" Returns the list of words being censored.\n"
" "
msgstr ""
"no tiene argumentos\n"
"\n"
"Devuelve la lista de palabras que se censuró.\n"
" "
#: plugin.py:125
msgid "I'm not currently censoring any bad words."
msgstr "No estoy actualmente censurando las malas palabras."
#: plugin.py:130
#, docstring
msgid ""
"<word> [<word> ...]\n"
"\n"
" Adds all <word>s to the list of words being censored.\n"
" "
msgstr ""
"<Palabra> [<palabra> ...]\n"
"\n"
"Añade todos <palabra> s a la lista de palabras que se censuró.\n"
" "
#: plugin.py:142
#, docstring
msgid ""
"<word> [<word> ...]\n"
"\n"
" Removes <word>s from the list of words being censored.\n"
" "
msgstr ""
"<Palabra> [<palabra> ...]\n"
"\n"
"Elimina <palabra> s de la lista de palabras que se censuró.\n"
" "

View File

@ -1,188 +0,0 @@
# BadWords plugin in Limnoria.
# Copyright (C) 2011 Limnoria
# Mikaela Suomalainen <mikaela.suomalainen@outlook.com>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: Supybot BadWords\n"
"POT-Creation-Date: 2011-02-26 09:49+CET\n"
"PO-Revision-Date: \n"
"Last-Translator: Mikaela Suomalainen <mikaela.suomalainen@outlook.com>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Finnish\n"
"X-Poedit-Country: FINLAND\n"
#: config.py:40
msgid "Would you like to add some bad words?"
msgstr "Haluaisitko lisätä joitakin pahoja sanoja?"
#: config.py:41
msgid "What words? (separate individual words by spaces)"
msgstr "Mitkä sanat? (Rajoita erilliset sanat käyttämällä välilyöntiä)."
#: config.py:53
msgid ""
"Determines what words are\n"
" considered to be 'bad' so the bot won't say them."
msgstr ""
"Määrittää mitkä sanat ovat\n"
" 'pahoja', jottei botti sano niitä."
#: config.py:56
msgid ""
"Determines whether the bot will require bad\n"
" words to be independent words, or whether it will censor them within other\n"
" words. For instance, if 'darn' is a bad word, then if this is true, 'darn'\n"
" will be censored, but 'darnit' will not. You probably want this to be\n"
" false. After changing this setting, the BadWords regexp needs to be\n"
" regenerated by adding/removing a word to the list, or reloading the\n"
" plugin."
msgstr ""
"Määrittää vaatiiko botti pahojen sanojen\n"
" olevan toisistaan riippumattomia sanoja, vai sensuroiko se ne toisten sanojen\n"
" sisältä. Esimerkiksi, jos 'pah' on paha sana, ja jos tämä on asetus on true, 'pah'\n"
" sensuroidaan, mutta 'pahus' ei sensuroida. Sinä luultavasti tahdot pitää tämän\n"
" false:na. Tämän asetuksen muuttamisen jälkeen, BadWords säännöllinen lauseke täytyy\n"
" luoda uudelleen lisäämällä/poistamalla sana listalta, tai lataamalla lisäosa \n"
" uudelleen."
#: config.py:73
msgid ""
"Determines what characters will replace bad words; a\n"
" chunk of these characters matching the size of the replaced bad word will\n"
" be used to replace the bad words you've configured."
msgstr ""
"Määrittä mitkä merkit korvaavat pahat sanat; \n"
" osia näistä merkeistä, jotka sopivat pahan sanan kokoon,\n"
" käytetään määrittämiesi pahojen sanojen korvaamisessa."
#: config.py:81
msgid ""
"Determines the manner in which\n"
" bad words will be replaced. 'nastyCharacters' (the default) will replace a\n"
" bad word with the same number of 'nasty characters' (like those used in\n"
" comic books; configurable by supybot.plugins.BadWords.nastyChars).\n"
" 'simple' will replace a bad word with a simple strings (regardless of the\n"
" length of the bad word); this string is configurable via\n"
" supybot.plugins.BadWords.simpleReplacement."
msgstr ""
"Määrittää millä tavalla\n"
" pahat sanat korvataan. 'nastyCharacters' (oletus) korvaa\n"
" pahan sanan samalla määrällä 'häijyjä merkkejä' (kuten ne jotka ovat\n"
" sarjakuvissa; muokattavissa supybot.plugins.BadWords.nastyChars asetuksella).\n"
" 'simple' korvaa pahan sanan yksinkertaisella merkkiketjulla (riippumatta\n"
" pahan sanan koosta); tämä merkkiketju on muokattavissa\n"
" asetuksella supybot.plugins.BadWords.simpleReplacement."
#: config.py:89
msgid ""
"Determines what word will replace bad\n"
" words if the replacement method is 'simple'."
msgstr ""
"Määrittää mikä sana korvaa pahat\n"
" sanat jos korvausmenetelmä on 'simple'."
#: config.py:92
msgid ""
"Determines whether the bot will strip\n"
" formatting characters from messages before it checks them for bad words.\n"
" If this is False, it will be relatively trivial to circumvent this plugin's\n"
" filtering. If it's True, however, it will interact poorly with other\n"
" plugins that do coloring or bolding of text."
msgstr ""
"Määrittää riisuuko botti\n"
" muotoilun merkeistä ennen kuin se tarkistaa ne pahojen sanojen varalta.\n"
" Jos tämä on 'False', on hyvin pinnallista kiertää tämän lisäosan\n"
" suodatusta. Jos se kuitenkin on 'True', se on huonosti vuorovaikutuksessa\n"
" tekstin värittämistä tai korostamista tekevien lisäosien kanssa."
#: config.py:99
msgid ""
"Determines whether the bot will kick people with\n"
" a warning when they use bad words."
msgstr ""
"Määrittää potkiiko botti ihmiset\n"
" varoituksella jos he käyttävät pahoja sanoja."
#: config.py:102
msgid ""
"You have been kicked for using a word\n"
" prohibited in the presence of this bot. Please use more appropriate\n"
" language in the future."
msgstr ""
" Sinut on potkittu kielletyn sanan\n"
" käytöstä tämän botin läsnäollessa. Ole hyvä ja käytä asianmukaisempaa\n"
" kieltä tulevaisuudessa."
#: config.py:104
msgid ""
"Determines the kick message used by the\n"
" bot when kicking users for saying bad words."
msgstr ""
"Määrittää potkimisviestin, jota\n"
" botti käyttää, kun potkii käyttäjiä pahojen sanojen käyttämistä."
#: plugin.py:46
msgid ""
"Maintains a list of words that the bot is not allowed to say.\n"
" Can also be used to kick people that say these words, if the bot\n"
" has op."
msgstr ""
"Säilyttää listaa sanoista, joita botin ei ole sallittua sanoa.\n"
" Voidaan myös käyttää potkimaan ihmisiä, jotka sanovat näitä sanoja, jos botilla\n"
" on opit."
#: plugin.py:113
msgid ""
"takes no arguments\n"
"\n"
" Returns the list of words being censored.\n"
" "
msgstr ""
"ei ota parametrejä\n"
"\n"
" Palauttaa listan sanoista, joita sensuroidaan.\n"
" "
#: plugin.py:123
msgid "I'm not currently censoring any bad words."
msgstr "En ole sensuroimassa yhtään pahaa sanaa juuri nyt."
#: plugin.py:128
msgid ""
"<word> [<word> ...]\n"
"\n"
" Adds all <word>s to the list of words being censored.\n"
" "
msgstr ""
"<sana> [<sana> ...]\n"
"\n"
" Lisää kaikki <sana>(t) sensuroitaviin sanoihin.\n"
" "
#: plugin.py:140
msgid ""
"<word> [<word> ...]\n"
"\n"
" Removes <word>s from the list of words being censored.\n"
" "
msgstr ""
"<sana> [<sana> ...]\n"
"\n"
" Poistaa <sana>(t) sensuroitujen sanojen listalta.\n"
" "
#~ msgid ""
#~ "\n"
#~ "Filters bad words on outgoing messages from the bot, so the bot can't be "
#~ "made\n"
#~ "to say bad words.\n"
#~ msgstr ""
#~ "\n"
#~ "Suodattaa botin ulostulevista viesteistä pahat sanat, jotta bottia ei "
#~ "saada\n"
#~ "sanomaan pahoja sanoja.\n"

View File

@ -1,136 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Limnoria\n"
"POT-Creation-Date: 2011-02-26 09:49+CET\n"
"PO-Revision-Date: \n"
"Last-Translator: Valentin Lorentz <progval@gmail.com>\n"
"Language-Team: Limnoria <progval@gmail.com>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Français\n"
"X-Poedit-Country: France\n"
"X-Poedit-SourceCharset: ASCII\n"
#: config.py:40
msgid "Would you like to add some bad words?"
msgstr "Voulez-vous ajouter quelques mots interdits ?"
#: config.py:41
msgid "What words? (separate individual words by spaces)"
msgstr "Quels mots ? (séparez chaque mot par un espace)"
#: config.py:53
msgid ""
"Determines what words are\n"
" considered to be 'bad' so the bot won't say them."
msgstr "Détermine quels mots sont considérés comme interdits, donc le bot ne les dira pas."
#: config.py:56
msgid ""
"Determines whether the bot will require bad\n"
" words to be independent words, or whether it will censor them within other\n"
" words. For instance, if 'darn' is a bad word, then if this is true, 'darn'\n"
" will be censored, but 'darnit' will not. You probably want this to be\n"
" false. After changing this setting, the BadWords regexp needs to be\n"
" regenerated by adding/removing a word to the list, or reloading the\n"
" plugin."
msgstr "Détermine si le bot requiert que les gros mots soient indépendants, ou si ils peuvent être dans d'autres mots. Par exemple, si 'merde' est censuré et que c'est True, 'merde' sera censuré, mais pas 'emmerder'. Il est probablement mieux que ceci soit False. Après avoir modifié ce paramètre, l'expression régulière de BadWords doit être regénérée en ajoutant/supprimant un mot de la liste, ou en rechargeant le plugin."
#: config.py:73
msgid ""
"Determines what characters will replace bad words; a\n"
" chunk of these characters matching the size of the replaced bad word will\n"
" be used to replace the bad words you've configured."
msgstr "Détermine par quels caractères seront remplacés les gros mots ; un morceau de ces caractères ayant la même taille que le mot remplacé sera utilisé pour remplacer les gros mots que vous avez configurés."
#: config.py:81
msgid ""
"Determines the manner in which\n"
" bad words will be replaced. 'nastyCharacters' (the default) will replace a\n"
" bad word with the same number of 'nasty characters' (like those used in\n"
" comic books; configurable by supybot.plugins.BadWords.nastyChars).\n"
" 'simple' will replace a bad word with a simple strings (regardless of the\n"
" length of the bad word); this string is configurable via\n"
" supybot.plugins.BadWords.simpleReplacement."
msgstr "Détermine la manière dont les gros mots sont remplacés. 'nastyCharacters' (par défaut) remplacera un gros mot par le même nombre de 'caractères obscènes' (comme ceux utilisés dans les bandes dessinées ; configurables dans supybot.plugins.BadWords.nastyChars). 'simple' remplacera le mot pas une simple chaîne (peu importe la taille du gros mot) ; cette chaîne est configurable dans supybot.plugins.BadWords.simpleReplacement."
#: config.py:89
msgid ""
"Determines what word will replace bad\n"
" words if the replacement method is 'simple'."
msgstr "Détermin quel mot remplacera les mots interdits, si la méthode de remplacement est 'simple'."
#: config.py:92
msgid ""
"Determines whether the bot will strip\n"
" formatting characters from messages before it checks them for bad words.\n"
" If this is False, it will be relatively trivial to circumvent this plugin's\n"
" filtering. If it's True, however, it will interact poorly with other\n"
" plugins that do coloring or bolding of text."
msgstr "Détermine si le bot retirera les caractères de formattage avant de vérifier qu'ils contiennent des gros mots. Si ceci est False, ce sera relativement simple de contourner la protection. Si c'est True, toutefois, il fera perdre toute couleur ou formattage des autres plugins"
#: config.py:99
msgid ""
"Determines whether the bot will kick people with\n"
" a warning when they use bad words."
msgstr "Détermine si le bot kickera les gens avec un avertissement lorsqu'ils utilisent des gros mots."
#: config.py:102
msgid ""
"You have been kicked for using a word\n"
" prohibited in the presence of this bot. Please use more appropriate\n"
" language in the future."
msgstr "Vous avez été kické(e) parce que vous avez utilisé un mot interdit en la présence de ce bot. Veuillez utiliser un langage plus approprié par le futur."
#: config.py:104
msgid ""
"Determines the kick message used by the\n"
" bot when kicking users for saying bad words."
msgstr "Détermine le message de kick utilisé par le bot lorsqu'il kick des utilisateurs utilisant des gros mots."
#: plugin.py:46
msgid ""
"Maintains a list of words that the bot is not allowed to say.\n"
" Can also be used to kick people that say these words, if the bot\n"
" has op."
msgstr ""
#: plugin.py:113
msgid ""
"takes no arguments\n"
"\n"
" Returns the list of words being censored.\n"
" "
msgstr ""
"ne prend pas d'argument\n"
"\n"
"Retourne une liste de mots qui sont censurés."
#: plugin.py:123
msgid "I'm not currently censoring any bad words."
msgstr "Je ne censure actuellement aucun mot."
#: plugin.py:128
msgid ""
"<word> [<word> ...]\n"
"\n"
" Adds all <word>s to the list of words being censored.\n"
" "
msgstr ""
"<mot> [<mot> ...]\n"
"\n"
"Ajoute tous les mots à la liste des mots que le bot ne doit pas dire."
#: plugin.py:140
msgid ""
"<word> [<word> ...]\n"
"\n"
" Removes <word>s from the list of words being censored.\n"
" "
msgstr ""
"<mot> [<mot> ...]\n"
"\n"
"Retire les <mot>s de la liste des mots que le bot ne doit pas dire."

View File

@ -1,167 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Limnoria\n"
"POT-Creation-Date: 2011-02-26 09:49+CET\n"
"PO-Revision-Date: 2011-06-28 23:29+0200\n"
"Last-Translator: skizzhg <skizzhg@gmx.com>\n"
"Language-Team: Italian <skizzhg@gmx.com>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: config.py:40
msgid "Would you like to add some bad words?"
msgstr "Vuoi aggiungere delle parole volgari?"
#: config.py:41
msgid "What words? (separate individual words by spaces)"
msgstr "Quali parole? (separa ciascuna con uno spazio)"
#: config.py:53
msgid ""
"Determines what words are\n"
" considered to be 'bad' so the bot won't say them."
msgstr ""
"Determina quali parole sono considerate \"volgari\" per cui il bot non le pronuncerà.\n"
#: config.py:56
msgid ""
"Determines whether the bot will require bad\n"
" words to be independent words, or whether it will censor them within other\n"
" words. For instance, if 'darn' is a bad word, then if this is true, 'darn'\n"
" will be censored, but 'darnit' will not. You probably want this to be\n"
" false. After changing this setting, the BadWords regexp needs to be\n"
" regenerated by adding/removing a word to the list, or reloading the\n"
" plugin."
msgstr ""
"Determina se il bot richieda che le parole volgari siano indipendenti o all'interno\n"
" di altre parole. Ad esempio, se \"merda\" è volgare e questa opzione è impostata\n"
" a True, verrà censurata, ma \"merdata\" non lo sarà; probabilmente si preferisce\n"
" che questa sia su False. Dopo aver modificato questa impostazione, la regexp di\n"
" BadWords deve essere rigenerata con l'aggiunta o la rimozione di una parola\n"
" dall'elenco o ricaricando il plugin."
#: config.py:73
msgid ""
"Determines what characters will replace bad words; a\n"
" chunk of these characters matching the size of the replaced bad word will\n"
" be used to replace the bad words you've configured."
msgstr ""
"Determina quali caratteri sostituiranno le parole volgari, verranno utilizzati\n"
" rimpiazzando la parola da censurare in tutta la sua lunghezza."
#: config.py:81
msgid ""
"Determines the manner in which\n"
" bad words will be replaced. 'nastyCharacters' (the default) will replace a\n"
" bad word with the same number of 'nasty characters' (like those used in\n"
" comic books; configurable by supybot.plugins.BadWords.nastyChars).\n"
" 'simple' will replace a bad word with a simple strings (regardless of the\n"
" length of the bad word); this string is configurable via\n"
" supybot.plugins.BadWords.simpleReplacement."
msgstr ""
"Determina come verranno sostituite le parole volgari. \"nastyCharacters\" (predefinito)\n"
" rimpiazzerà la parola con lo stesso numero di \"brutti caratteri\" (come quelli usati\n"
" nei fumetti; configurabile da supybot.plugins.BadWords.nastyChars). \"simple\" sostituirà\n"
" una parola volgare con una stringa semplice (indipendentemente dalla lunghezza della parola);\n"
" questa stringa è configurabile tramite supybot.plugins.BadWords.simpleReplacement."
#: config.py:89
msgid ""
"Determines what word will replace bad\n"
" words if the replacement method is 'simple'."
msgstr ""
"Determina quale parola sostituirà quelle volgari se viene usato il metodo \"simple\"."
#: config.py:92
msgid ""
"Determines whether the bot will strip\n"
" formatting characters from messages before it checks them for bad words.\n"
" If this is False, it will be relatively trivial to circumvent this plugin's\n"
" filtering. If it's True, however, it will interact poorly with other\n"
" plugins that do coloring or bolding of text."
msgstr ""
"Determina se il bot rimuoverà i caratteri di formattazione prima di controllare\n"
" che contengano parole volgari. Se impostato a False sarà relativamente facile\n"
" aggirare i filtri di questo plugin; tuttavia se impostato a True non interagirà\n"
" con altri plugin che colorano o rendono il testo grassetto."
#: config.py:99
msgid ""
"Determines whether the bot will kick people with\n"
" a warning when they use bad words."
msgstr ""
"Determina se il bot caccerà (kick) gli utenti con un avvertimento quando usano volgarità."
#: config.py:102
msgid ""
"You have been kicked for using a word\n"
" prohibited in the presence of this bot. Please use more appropriate\n"
" language in the future."
msgstr ""
"Sei stato/a cacciato/a per aver usato parole proibite in presenza del bot.\n"
" In futuro utilizza un linguaggio più appropriato."
#: config.py:104
msgid ""
"Determines the kick message used by the\n"
" bot when kicking users for saying bad words."
msgstr ""
"Determina il messaggio del kick utilizzato dal bot per espellere gli utenti che scrivono volgarità."
#: plugin.py:46
#, docstring
msgid ""
"Maintains a list of words that the bot is not allowed to say.\n"
" Can also be used to kick people that say these words, if the bot\n"
" has op."
msgstr ""
"Mantiene un elenco di parole che il bot non può dire.\n"
" Se il bot ha lo stato di operatore, può essere anche utilizzato\n"
" per cacciare (kick) utenti che scrivono queste parole."
#: plugin.py:113
#, docstring
msgid ""
"takes no arguments\n"
"\n"
" Returns the list of words being censored.\n"
" "
msgstr ""
"non necessita argomenti\n"
"\n"
" Riporta l'elenco delle parole censurate.\n"
" "
#: plugin.py:123
msgid "I'm not currently censoring any bad words."
msgstr "Al momento non ho alcuna parola censurata."
#: plugin.py:128
#, docstring
msgid ""
"<word> [<word> ...]\n"
"\n"
" Adds all <word>s to the list of words being censored.\n"
" "
msgstr ""
"<parola> [<parola> ...]\n"
"\n"
" Aggiunge <parola> all'elenco di quelle da censurare.\n"
" "
#: plugin.py:140
#, docstring
msgid ""
"<word> [<word> ...]\n"
"\n"
" Removes <word>s from the list of words being censored.\n"
" "
msgstr ""
"<parola> [<parola> ...]\n"
"\n"
" Rimuove <parola> dall'elenco di quelle da censurare.\n"
" "

View File

@ -1,133 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2014-03-22 16:34+EET\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Generated-By: pygettext.py 1.5\n"
#: config.py:42
msgid "Would you like to add some bad words?"
msgstr ""
#: config.py:43
msgid "What words? (separate individual words by spaces)"
msgstr ""
#: config.py:55
msgid ""
"Determines what words are\n"
" considered to be 'bad' so the bot won't say them."
msgstr ""
#: config.py:58
msgid ""
"Determines whether the bot will require bad\n"
" words to be independent words, or whether it will censor them within other\n"
" words. For instance, if 'darn' is a bad word, then if this is true, 'darn'\n"
" will be censored, but 'darnit' will not. You probably want this to be\n"
" false. After changing this setting, the BadWords regexp needs to be\n"
" regenerated by adding/removing a word to the list, or reloading the\n"
" plugin."
msgstr ""
#: config.py:75
msgid ""
"Determines what characters will replace bad words; a\n"
" chunk of these characters matching the size of the replaced bad word will\n"
" be used to replace the bad words you've configured."
msgstr ""
#: config.py:83
msgid ""
"Determines the manner in which\n"
" bad words will be replaced. 'nastyCharacters' (the default) will replace a\n"
" bad word with the same number of 'nasty characters' (like those used in\n"
" comic books; configurable by supybot.plugins.BadWords.nastyChars).\n"
" 'simple' will replace a bad word with a simple strings (regardless of the\n"
" length of the bad word); this string is configurable via\n"
" supybot.plugins.BadWords.simpleReplacement."
msgstr ""
#: config.py:91
msgid ""
"Determines what word will replace bad\n"
" words if the replacement method is 'simple'."
msgstr ""
#: config.py:94
msgid ""
"Determines whether the bot will strip\n"
" formatting characters from messages before it checks them for bad words.\n"
" If this is False, it will be relatively trivial to circumvent this plugin's\n"
" filtering. If it's True, however, it will interact poorly with other\n"
" plugins that do coloring or bolding of text."
msgstr ""
#: config.py:101
msgid ""
"Determines whether the bot will kick people with\n"
" a warning when they use bad words."
msgstr ""
#: config.py:104
msgid ""
"You have been kicked for using a word\n"
" prohibited in the presence of this bot. Please use more appropriate\n"
" language in the future."
msgstr ""
#: config.py:106
msgid ""
"Determines the kick message used by the\n"
" bot when kicking users for saying bad words."
msgstr ""
#: plugin.py:46
#, docstring
msgid ""
"Maintains a list of words that the bot is not allowed to say.\n"
" Can also be used to kick people that say these words, if the bot\n"
" has op."
msgstr ""
#: plugin.py:115
#, docstring
msgid ""
"takes no arguments\n"
"\n"
" Returns the list of words being censored.\n"
" "
msgstr ""
#: plugin.py:125
msgid "I'm not currently censoring any bad words."
msgstr ""
#: plugin.py:130
#, docstring
msgid ""
"<word> [<word> ...]\n"
"\n"
" Adds all <word>s to the list of words being censored.\n"
" "
msgstr ""
#: plugin.py:142
#, docstring
msgid ""
"<word> [<word> ...]\n"
"\n"
" Removes <word>s from the list of words being censored.\n"
" "
msgstr ""

View File

@ -1,183 +0,0 @@
###
# Copyright (c) 2004, Jeremiah Fincher
# Copyright (c) 2009, James McCoy
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
import re
import time
import supybot.conf as conf
import supybot.utils as utils
import supybot.ircdb as ircdb
import supybot.ircmsgs as ircmsgs
from supybot.commands import *
import supybot.ircutils as ircutils
import supybot.callbacks as callbacks
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization("BadWords")
class BadWords(callbacks.Privmsg):
"""Maintains a list of words that the bot is not allowed to say.
Can also be used to kick people that say these words, if the bot
has op."""
def __init__(self, irc):
self.__parent = super(BadWords, self)
self.__parent.__init__(irc)
# This is so we can not filter certain outgoing messages (like list,
# which would be kinda useless if it were filtered).
self.filtering = True
self.lastModified = 0
self.words = conf.supybot.plugins.BadWords.words
def callCommand(self, name, irc, msg, *args, **kwargs):
if ircdb.checkCapability(msg.prefix, "admin"):
self.__parent.callCommand(name, irc, msg, *args, **kwargs)
else:
irc.errorNoCapability("admin")
def sub(self, m):
replaceMethod = self.registryValue("replaceMethod")
if replaceMethod == "simple":
return self.registryValue("simpleReplacement")
elif replaceMethod == "nastyCharacters":
return self.registryValue("nastyChars")[: len(m.group(1))]
def inFilter(self, irc, msg):
self.filtering = True
# We need to check for bad words here rather than in doPrivmsg because
# messages don't get to doPrivmsg if the user is ignored.
if msg.command == "PRIVMSG" and self.words():
channel = msg.args[0]
self.updateRegexp(channel)
s = ircutils.stripFormatting(msg.args[1])
if ircutils.isChannel(channel) and self.registryValue("kick", channel):
if self.regexp.search(s):
c = irc.state.channels[channel]
cap = ircdb.makeChannelCapability(channel, "op")
if c.isHalfopPlus(irc.nick):
if c.isHalfopPlus(msg.nick) or ircdb.checkCapability(
msg.prefix, cap
):
self.log.debug(
"Not kicking %s from %s, because "
"they are halfop+ or can't be "
"kicked.",
msg.nick,
channel,
)
else:
message = self.registryValue("kick.message", channel)
irc.queueMsg(ircmsgs.kick(channel, msg.nick, message))
else:
self.log.warning(
"Should kick %s from %s, but not opped.", msg.nick, channel
)
elif (
ircutils.isChannel(channel)
and self.regexp.search(s)
and self.registryValue("inFilter", channel)
and not ircdb.checkCapability(msg.prefix, "trusted")
):
return None
return msg
def updateRegexp(self, channel):
if self.lastModified < self.words.lastModified:
self.makeRegexp(self.words(), channel)
self.lastModified = time.time()
def outFilter(self, irc, msg):
if self.filtering and msg.command == "PRIVMSG" and self.words():
channel = msg.args[0]
self.updateRegexp(channel)
s = msg.args[1]
if self.registryValue("stripFormatting"):
s = ircutils.stripFormatting(s)
t = self.regexp.sub(self.sub, s)
if t != s:
msg = ircmsgs.privmsg(msg.args[0], t, msg=msg)
return msg
def makeRegexp(self, iterable, channel):
s = "(%s)" % "|".join(map(re.escape, iterable))
if self.registryValue("requireWordBoundaries", channel):
s = r"\b%s\b" % s
self.regexp = re.compile(s, re.I)
@internationalizeDocstring
def list(self, irc, msg, args):
"""takes no arguments
Returns the list of words being censored.
"""
L = list(self.words())
if L:
self.filtering = False
utils.sortBy(str.lower, L)
irc.reply(format("%L", L))
else:
irc.reply(_("I'm not currently censoring any bad words."))
list = wrap(list, ["admin"])
@internationalizeDocstring
def add(self, irc, msg, args, words):
"""<word> [<word> ...]
Adds all <word>s to the list of words being censored.
"""
set = self.words()
set.update(words)
self.words.setValue(set)
irc.replySuccess()
add = wrap(add, ["admin", many("something")])
@internationalizeDocstring
def remove(self, irc, msg, args, words):
"""<word> [<word> ...]
Removes <word>s from the list of words being censored.
"""
set = self.words()
for word in words:
set.discard(word)
self.words.setValue(set)
irc.replySuccess()
remove = wrap(remove, ["admin", many("something")])
Class = BadWords
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:

View File

@ -1,85 +0,0 @@
###
# Copyright (c) 2004, Jeremiah Fincher
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
import supybot.conf as conf
from supybot.test import *
class BadWordsTestCase(PluginTestCase):
plugins = ("BadWords", "Utilities", "Format", "Filter")
badwords = ("shit", "ass", "fuck")
def tearDown(self):
# .default() doesn't seem to be working for BadWords.words
# default = conf.supybot.plugins.BadWords.words.default()
# conf.supybot.plugins.BadWords.words.setValue(default)
conf.supybot.plugins.BadWords.words.setValue([])
def _test(self):
for word in self.badwords:
self.assertRegexp("echo %s" % word, "(?!%s)" % word)
self.assertRegexp("echo [colorize %s]" % word, "(?!%s)" % word)
self.assertRegexp("echo foo%sbar" % word, "(?!%s)" % word)
self.assertRegexp("echo foo %s bar" % word, "(?!%s)" % word)
self.assertRegexp(
'echo [format join "" %s]' % " ".join(word), "(?!%s)" % word
)
with conf.supybot.plugins.BadWords.requireWordBoundaries.context(True):
self.assertRegexp("echo foo%sbar" % word, word)
self.assertRegexp("echo foo %sbar" % word, word)
self.assertRegexp("echo foo%s bar" % word, word)
self.assertRegexp("echo foo %s bar" % word, "(?!%s)" % word)
def _NegTest(self):
for word in self.badwords:
self.assertRegexp("echo %s" % word, word)
self.assertRegexp("echo foo%sbar" % word, word)
self.assertRegexp('echo [format join "" %s]' % " ".join(word), word)
def testAddbadwords(self):
self.assertNotError("badwords add %s" % " ".join(self.badwords))
self._test()
def testDefault(self):
self._NegTest()
def testRemovebadwords(self):
self.assertNotError("badwords add %s" % " ".join(self.badwords))
self.assertNotError("badwords remove %s" % " ".join(self.badwords))
self._NegTest()
def testList(self):
self.assertNotError("badwords list")
self.assertNotError("badwords add shit")
self.assertNotError("badwords add ass")
self.assertResponse("badwords list", "ass and shit")
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: