Forbade spectators from interacting IC.
This commit is contained in:
		
							parent
							
								
									29c91e63ea
								
							
						
					
					
						commit
						f3e9d691af
					
				@ -577,6 +577,9 @@ class AOProtocol(asyncio.Protocol):
 | 
			
		||||
            if not self.client.is_dj:
 | 
			
		||||
                self.client.send_host_message('You were blockdj\'d by a moderator.')
 | 
			
		||||
                return
 | 
			
		||||
            if area.cannot_ic_interact(self.client):
 | 
			
		||||
                self.client.send_host_message("You are not on the area's invite list, and thus, you cannot change music!")
 | 
			
		||||
                return
 | 
			
		||||
            if not self.validate_net_cmd(args, self.ArgType.STR, self.ArgType.INT) and not self.validate_net_cmd(args, self.ArgType.STR, self.ArgType.INT, self.ArgType.STR):
 | 
			
		||||
                return
 | 
			
		||||
            if args[1] != self.client.char_id:
 | 
			
		||||
@ -629,6 +632,9 @@ class AOProtocol(asyncio.Protocol):
 | 
			
		||||
        if not self.client.can_wtce:
 | 
			
		||||
            self.client.send_host_message('You were blocked from using judge signs by a moderator.')
 | 
			
		||||
            return
 | 
			
		||||
        if self.client.area.cannot_ic_interact(self.client):
 | 
			
		||||
            self.client.send_host_message("You are not on the area's invite list, and thus, you cannot use the WTCE buttons!")
 | 
			
		||||
            return
 | 
			
		||||
        if not self.validate_net_cmd(args, self.ArgType.STR) and not self.validate_net_cmd(args, self.ArgType.STR, self.ArgType.INT):
 | 
			
		||||
            return
 | 
			
		||||
        if args[0] == 'testimony1':
 | 
			
		||||
@ -658,6 +664,9 @@ class AOProtocol(asyncio.Protocol):
 | 
			
		||||
        if self.client.is_muted:  # Checks to see if the client has been muted by a mod
 | 
			
		||||
            self.client.send_host_message("You have been muted by a moderator")
 | 
			
		||||
            return
 | 
			
		||||
        if self.client.area.cannot_ic_interact(self.client):
 | 
			
		||||
            self.client.send_host_message("You are not on the area's invite list, and thus, you cannot change the Confidence bars!")
 | 
			
		||||
            return
 | 
			
		||||
        if not self.validate_net_cmd(args, self.ArgType.INT, self.ArgType.INT):
 | 
			
		||||
            return
 | 
			
		||||
        try:
 | 
			
		||||
 | 
			
		||||
@ -237,11 +237,14 @@ class AreaManager:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        def can_send_message(self, client):
 | 
			
		||||
            if self.is_locked != self.Locked.FREE and not client.is_mod and not client.id in self.invite_list:
 | 
			
		||||
            if self.cannot_ic_interact(client):
 | 
			
		||||
                client.send_host_message('This is a locked area - ask the CM to speak.')
 | 
			
		||||
                return False
 | 
			
		||||
            return (time.time() * 1000.0 - self.next_message_time) > 0
 | 
			
		||||
 | 
			
		||||
        def cannot_ic_interact(self, client):
 | 
			
		||||
            return self.is_locked != self.Locked.FREE and not client.is_mod and not client.id in self.invite_list
 | 
			
		||||
 | 
			
		||||
        def change_hp(self, side, val):
 | 
			
		||||
            if not 0 <= val <= 10:
 | 
			
		||||
                raise AreaError('Invalid penalty value.')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user