aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-09-06 20:41:49 +0200
committerCerapter <cerap@protonmail.com>2018-09-06 20:41:49 +0200
commitd0503eeb6ee783e571b7369edbdcc6710bee7ee7 (patch)
tree6a1ff52622c7635a16d75f7670dfb8fe481cb124
parent93cd2ad3747ff609e0aa2175a2622afe9ef6b56d (diff)
`/allow_blankposting` now catches ~~ too + CMs can use redtext now as well.
-rw-r--r--server/aoprotocol.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/aoprotocol.py b/server/aoprotocol.py
index d8d91d2c..44b46122 100644
--- a/server/aoprotocol.py
+++ b/server/aoprotocol.py
@@ -396,7 +396,7 @@ class AOProtocol(asyncio.Protocol):
if text.isspace():
self.client.send_host_message("Blankposting is forbidden in this area, and putting more spaces in does not make it not blankposting.")
return
- if len(re.sub(r'[{}\\`|]','', text).replace(' ', '')) < 3 and text != '<' and text != '>':
+ if len(re.sub(r'[{}\\`|(~~)]','', text).replace(' ', '')) < 3 and text != '<' and text != '>':
self.client.send_host_message("While that is not a blankpost, it is still pretty spammy. Try forming sentences.")
return
if msg_type not in ('chat', '0', '1'):
@@ -435,7 +435,7 @@ class AOProtocol(asyncio.Protocol):
button = 0
# Turn off the ding.
ding = 0
- if color == 2 and not self.client.is_mod:
+ if color == 2 and not (self.client.is_mod or self.client.is_cm):
color = 0
if color == 6:
text = re.sub(r'[^\x00-\x7F]+',' ', text) #remove all unicode to prevent redtext abuse