def _send_global_chat_message(self, sender, message): server_message = ServerChatMessage() server_message.load_client_message(message) server_message.sender_guid = sender message_packet = server_message.to_packet() self.server.broadcast( message_packet, state = WorldConnectionState.IN_WORLD ) return 0
def _send_channel_message(self, channel, sender, message): members = channel.get_members() if sender not in members: return 1 server_message = ServerChatMessage() server_message.load_client_message(message) server_message.sender_guid = sender message_packet = server_message.to_packet() self.server.broadcast( message_packet, state = WorldConnectionState.IN_WORLD, guids = members ) return 0
def _send_global_chat_message(self, sender, message): server_message = ServerChatMessage() server_message.load_client_message(message) server_message.sender_guid = sender message_packet = server_message.to_packet() self.server.broadcast(message_packet, state=WorldConnectionState.IN_WORLD) return 0
def _send_channel_message(self, channel, sender, message): members = channel.get_members() if sender not in members: return 1 server_message = ServerChatMessage() server_message.load_client_message(message) server_message.sender_guid = sender message_packet = server_message.to_packet() self.server.broadcast(message_packet, state=WorldConnectionState.IN_WORLD, guids=members) return 0