aboutsummaryrefslogtreecommitdiff
path: root/server/aoprotocol.py
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-11-02 15:28:31 +0100
committerCerapter <cerap@protonmail.com>2018-11-02 15:28:31 +0100
commit1f8b4944ca3a4a95b1f73c9275facee12f637c14 (patch)
treeb9805d3f50bd1f6b7a9fbed296535dce72150523 /server/aoprotocol.py
parente8bb1f1e490e52bbfad2bbf75c56f20109a28926 (diff)
A safety measure regarding the IC commands `/a` and `/s`.
Made it so they actually require the command plus a space, so that things like `/area` in IC don't get caught.
Diffstat (limited to 'server/aoprotocol.py')
-rw-r--r--server/aoprotocol.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/aoprotocol.py b/server/aoprotocol.py
index 0af8f67b..2cf6fb43 100644
--- a/server/aoprotocol.py
+++ b/server/aoprotocol.py
@@ -401,7 +401,7 @@ class AOProtocol(asyncio.Protocol):
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 text.startswith('/a'):
+ if text.startswith('/a '):
part = text.split(' ')
try:
aid = int(part[1])
@@ -414,7 +414,7 @@ class AOProtocol(asyncio.Protocol):
except ValueError:
self.client.send_host_message("That does not look like a valid area ID!")
return
- elif text.startswith('/s'):
+ elif text.startswith('/s '):
part = text.split(' ')
for a in self.server.area_manager.areas:
if self.client in a.owners: