mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Fixed a bug with outFilter losing tags.
This commit is contained in:
parent
d253d7e1bf
commit
f92e37704b
@ -45,6 +45,7 @@ import supybot.conf as conf
|
|||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
import supybot.ircdb as ircdb
|
import supybot.ircdb as ircdb
|
||||||
import supybot.ircmsgs as ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
|
from supybot.commands import wrap
|
||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
import supybot.privmsgs as privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
@ -131,7 +132,7 @@ class BadWords(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
s = msg.args[1]
|
s = msg.args[1]
|
||||||
s = ircutils.stripFormatting(s)
|
s = ircutils.stripFormatting(s)
|
||||||
s = self.regexp.sub(self.sub, s)
|
s = self.regexp.sub(self.sub, s)
|
||||||
msg = ircmsgs.privmsg(msg.args[0], s)
|
msg = ircmsgs.privmsg(msg.args[0], s, msg=msg)
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
def makeRegexp(self, iterable):
|
def makeRegexp(self, iterable):
|
||||||
@ -152,27 +153,30 @@ class BadWords(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
irc.reply(utils.commaAndify(L))
|
irc.reply(utils.commaAndify(L))
|
||||||
else:
|
else:
|
||||||
irc.reply('I\'m not currently censoring any bad words.')
|
irc.reply('I\'m not currently censoring any bad words.')
|
||||||
|
list = wrap(list)
|
||||||
|
|
||||||
def add(self, irc, msg, args):
|
def add(self, irc, msg, args, words):
|
||||||
"""<word> [<word> ...]
|
"""<word> [<word> ...]
|
||||||
|
|
||||||
Adds all <word>s to the list of words the bot isn't to say.
|
Adds all <word>s to the list of words the bot isn't to say.
|
||||||
"""
|
"""
|
||||||
set = self.words()
|
set = self.words()
|
||||||
set.update(args)
|
set.update(words)
|
||||||
self.words.setValue(set)
|
self.words.setValue(set)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
|
add = wrap(add, ['something+'])
|
||||||
|
|
||||||
def remove(self, irc, msg, args):
|
def remove(self, irc, msg, args, words):
|
||||||
"""<word> [<word> ...]
|
"""<word> [<word> ...]
|
||||||
|
|
||||||
Removes a <word>s from the list of words the bot isn't to say.
|
Removes a <word>s from the list of words the bot isn't to say.
|
||||||
"""
|
"""
|
||||||
set = self.words()
|
set = self.words()
|
||||||
for word in args:
|
for word in words:
|
||||||
set.discard(word)
|
set.discard(word)
|
||||||
self.words.setValue(set)
|
self.words.setValue(set)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
|
remove = wrap(remove, ['something+'])
|
||||||
|
|
||||||
|
|
||||||
Class = BadWords
|
Class = BadWords
|
||||||
|
Loading…
Reference in New Issue
Block a user