Fixed a bug where shownames would always be forbidden.
This commit is contained in:
		
							parent
							
								
									374e939ac4
								
							
						
					
					
						commit
						651585f191
					
				@ -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.INT,
 | 
				
			||||||
                                     self.ArgType.INT, self.ArgType.INT, self.ArgType.INT, self.ArgType.STR):
 | 
					                                     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
 | 
					            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!")
 | 
					                self.client.send_host_message("Showname changes are forbidden in this area!")
 | 
				
			||||||
                return
 | 
					                return
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            return
 | 
					            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():
 | 
					        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")
 | 
					            self.client.send_host_message("Iniswap is blocked in this area")
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
				
			|||||||
@ -49,6 +49,8 @@ class AreaManager:
 | 
				
			|||||||
            self.recorded_messages = []
 | 
					            self.recorded_messages = []
 | 
				
			||||||
            self.evidence_mod = evidence_mod
 | 
					            self.evidence_mod = evidence_mod
 | 
				
			||||||
            self.locking_allowed = locking_allowed
 | 
					            self.locking_allowed = locking_allowed
 | 
				
			||||||
 | 
					            self.showname_changes_allowed = showname_changes_allowed
 | 
				
			||||||
 | 
					            self.shouts_allowed = shouts_allowed
 | 
				
			||||||
            self.owned = False
 | 
					            self.owned = False
 | 
				
			||||||
            self.cards = dict()
 | 
					            self.cards = dict()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user