mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
BadWords: Only send a msg stripped of formatting if it had bad words
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
84ca6f2ae3
commit
5301390290
@ -1,5 +1,6 @@
|
|||||||
###
|
###
|
||||||
# Copyright (c) 2002-2004, Jeremiah Fincher
|
# Copyright (c) 2002-2004, Jeremiah Fincher
|
||||||
|
# Copyright (c) 2009, James Vega
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -91,8 +92,9 @@ class BadWords(callbacks.Privmsg):
|
|||||||
s = msg.args[1]
|
s = msg.args[1]
|
||||||
if self.registryValue('stripFormatting'):
|
if self.registryValue('stripFormatting'):
|
||||||
s = ircutils.stripFormatting(s)
|
s = ircutils.stripFormatting(s)
|
||||||
s = self.regexp.sub(self.sub, s)
|
t = self.regexp.sub(self.sub, s)
|
||||||
msg = ircmsgs.privmsg(msg.args[0], s, msg=msg)
|
if t != s:
|
||||||
|
msg = ircmsgs.privmsg(msg.args[0], t, msg=msg)
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
def makeRegexp(self, iterable):
|
def makeRegexp(self, iterable):
|
||||||
|
Loading…
Reference in New Issue
Block a user