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.
This commit is contained in:
parent
e8bb1f1e49
commit
1f8b4944ca
@ -401,7 +401,7 @@ class AOProtocol(asyncio.Protocol):
|
|||||||
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.")
|
self.client.send_host_message("While that is not a blankpost, it is still pretty spammy. Try forming sentences.")
|
||||||
return
|
return
|
||||||
if text.startswith('/a'):
|
if text.startswith('/a '):
|
||||||
part = text.split(' ')
|
part = text.split(' ')
|
||||||
try:
|
try:
|
||||||
aid = int(part[1])
|
aid = int(part[1])
|
||||||
@ -414,7 +414,7 @@ class AOProtocol(asyncio.Protocol):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
self.client.send_host_message("That does not look like a valid area ID!")
|
self.client.send_host_message("That does not look like a valid area ID!")
|
||||||
return
|
return
|
||||||
elif text.startswith('/s'):
|
elif text.startswith('/s '):
|
||||||
part = text.split(' ')
|
part = text.split(' ')
|
||||||
for a in self.server.area_manager.areas:
|
for a in self.server.area_manager.areas:
|
||||||
if self.client in a.owners:
|
if self.client in a.owners:
|
||||||
|
Loading…
Reference in New Issue
Block a user