Fixed a bug where shownames would always be forbidden.

This commit is contained in:
Cerapter 2018-07-31 03:24:44 +02:00
parent 374e939ac4
commit 651585f191
2 changed files with 3 additions and 2 deletions

View File

@ -347,12 +347,11 @@ class AOProtocol(asyncio.Protocol):
self.ArgType.INT, self.ArgType.INT, self.ArgType.INT, self.ArgType.INT,
self.ArgType.INT, self.ArgType.INT, self.ArgType.INT, self.ArgType.STR):
msg_type, pre, folder, anim, text, pos, sfx, anim_type, cid, sfx_delay, button, evidence, flip, ding, color, showname = args
if len(showname) > 0 and not self.client.area.showname_changes_allowed == "true":
if len(showname) > 0 and not self.client.area.showname_changes_allowed:
self.client.send_host_message("Showname changes are forbidden in this area!")
return
else:
return
msg_type, pre, folder, anim, text, pos, sfx, anim_type, cid, sfx_delay, button, evidence, flip, ding, color = args
if self.client.area.is_iniswap(self.client, pre, anim, folder) and folder != self.client.get_char_name():
self.client.send_host_message("Iniswap is blocked in this area")
return

View File

@ -49,6 +49,8 @@ class AreaManager:
self.recorded_messages = []
self.evidence_mod = evidence_mod
self.locking_allowed = locking_allowed
self.showname_changes_allowed = showname_changes_allowed
self.shouts_allowed = shouts_allowed
self.owned = False
self.cards = dict()