otp: Implement sequential blacklist configuration field

This commit is contained in:
Cosmos 2014-07-31 00:36:49 +03:00
parent 98af2f1cbc
commit fb9fa240ff

View file

@ -94,7 +94,8 @@ class ChatAgentUD(DistributedObjectGlobalUD):
offset += len(word) + 1
cleanMessage = message
modifications += self.cleanSequences(cleanMessage)
if self.air.config.GetBool('want-sequenceblacklist', True):
modifications += self.cleanSequences(cleanMessage)
for modStart, modStop in modifications:
cleanMessage = cleanMessage[:modStart] + '*'*(modStop-modStart+1) + cleanMessage[modStop+1:]