mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-04 16:44:11 +01:00
Add ability to exclude channel from self censoring (#1508)
This commit is contained in:
parent
6379a9d43a
commit
d04e8161d5
@ -113,6 +113,9 @@ conf.registerGlobalValue(BadWords, 'stripFormatting',
|
|||||||
filtering. If it's True, however, it will interact poorly with other
|
filtering. If it's True, however, it will interact poorly with other
|
||||||
plugins that do coloring or bolding of text.""")))
|
plugins that do coloring or bolding of text.""")))
|
||||||
|
|
||||||
|
conf.registerChannelValue(BadWords, 'selfCensor',
|
||||||
|
registry.Boolean(True, _("""Determines whether the bot will filter its own
|
||||||
|
messages.""")))
|
||||||
conf.registerChannelValue(BadWords, 'kick',
|
conf.registerChannelValue(BadWords, 'kick',
|
||||||
registry.Boolean(False, _("""Determines whether the bot will kick people with
|
registry.Boolean(False, _("""Determines whether the bot will kick people with
|
||||||
a warning when they use bad words.""")))
|
a warning when they use bad words.""")))
|
||||||
|
@ -81,18 +81,24 @@ msgstr ""
|
|||||||
|
|
||||||
#: config.py:117
|
#: config.py:117
|
||||||
msgid ""
|
msgid ""
|
||||||
|
"Determines whether the bot will filter its own\n"
|
||||||
|
" messages."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: config.py:120
|
||||||
|
msgid ""
|
||||||
"Determines whether the bot will kick people with\n"
|
"Determines whether the bot will kick people with\n"
|
||||||
" a warning when they use bad words."
|
" a warning when they use bad words."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: config.py:120
|
#: config.py:123
|
||||||
msgid ""
|
msgid ""
|
||||||
"You have been kicked for using a word\n"
|
"You have been kicked for using a word\n"
|
||||||
" prohibited in the presence of this bot. Please use more appropriate\n"
|
" prohibited in the presence of this bot. Please use more appropriate\n"
|
||||||
" language in the future."
|
" language in the future."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: config.py:122
|
#: config.py:125
|
||||||
msgid ""
|
msgid ""
|
||||||
"Determines the kick message used by the\n"
|
"Determines the kick message used by the\n"
|
||||||
" bot when kicking users for saying bad words."
|
" bot when kicking users for saying bad words."
|
||||||
|
@ -104,9 +104,10 @@ class BadWords(callbacks.Privmsg):
|
|||||||
self.lastModified = time.time()
|
self.lastModified = time.time()
|
||||||
|
|
||||||
def outFilter(self, irc, msg):
|
def outFilter(self, irc, msg):
|
||||||
|
channel = msg.channel
|
||||||
if self.filtering and msg.command == 'PRIVMSG' \
|
if self.filtering and msg.command == 'PRIVMSG' \
|
||||||
and (self.words() or self.phrases()):
|
and (self.words() or self.phrases()) \
|
||||||
channel = msg.channel
|
and self.registryValue('selfCensor', channel, irc.network):
|
||||||
self.updateRegexp(channel, irc.network)
|
self.updateRegexp(channel, irc.network)
|
||||||
s = msg.args[1]
|
s = msg.args[1]
|
||||||
if self.registryValue('stripFormatting'):
|
if self.registryValue('stripFormatting'):
|
||||||
|
Loading…
Reference in New Issue
Block a user