def handle_private_channel_invite( self, packet: server_packets.PrivateChannelInvited): channel_name = self.character_service.get_char_name( packet.private_channel_id) self.bot.send_packet( client_packets.PrivateChannelJoin(packet.private_channel_id)) self.logger.info("Joined private channel %s" % channel_name)
def handle_private_channel_invite(self, packet: server_packets.PrivateChannelInvited): channel_name = self.character_service.get_char_name(packet.private_channel_id) if self.ban_service.get_ban(packet.private_channel_id): self.logger.info("ignore private channel invite from banned char '%s'" % channel_name) else: self.bot.send_packet(client_packets.PrivateChannelJoin(packet.private_channel_id)) self.logger.info("Joined private channel %s" % channel_name)
def handle_private_channel_invite(self, conn: Conn, packet: server_packets.PrivateChannelInvited): if not conn.is_main: return channel_name = self.character_service.get_char_name(packet.private_channel_id) if self.ban_service.get_ban(packet.private_channel_id): self.logger.info("ignore private channel invite from banned char '%s'" % channel_name) else: self.private_channels.add(packet.private_channel_id) conn.send_packet(client_packets.PrivateChannelJoin(packet.private_channel_id)) self.logger.info("Joined private channel %s" % channel_name)
def handle_private_channel_invite(self, conn: Conn, packet: server_packets.PrivateChannelInvited): if not conn.is_main: pass if self.setting_service.get_value("dark_relay") == "0": return if "Darknet" == self.character_service.get_char_name(packet.private_channel_id): channel_name = self.character_service.get_char_name(packet.private_channel_id) conn.send_packet(client_packets.PrivateChannelJoin(packet.private_channel_id)) self.logger.info("Joined private channel {channel}".format(channel=channel_name)) self.relay_channel_id = packet.private_channel_id self.relay_name = channel_name
def handle_private_channel_invite(self, conn, packet: server_packets.PrivateChannelInvited): channel_name = self.character_service.get_char_name(packet.private_channel_id) if self.setting_service.get_value("relaygcr_enabled") == "0": self.logger.info(f"Denied private Channel invite: {channel_name} - Relay Module not active") elif self.setting_service.get_value("relaygcr_bot") != channel_name: self.logger.info(f"Denied private Channel invite: {channel_name} - not the Relaybot") else: conn.send_packet(client_packets.PrivateChannelJoin(packet.private_channel_id)) self.logger.info(f"Joined private channel {channel_name}") self.relay_channel_id = packet.private_channel_id self.relay_name = channel_name self.online_send() self.send("!gcrc onlinereq")
def handle_private_channel_invite( self, packet: server_packets.PrivateChannelInvited): if not self.setting_service.get("arelay_enabled").get_value(): return channel_name = self.character_service.get_char_name( packet.private_channel_id) if self.setting_service.get_value( "arelaybot").lower() == channel_name.lower(): self.bot.send_packet( client_packets.PrivateChannelJoin(packet.private_channel_id)) self.logger.info("Joined private channel {channel}".format( channel=channel_name)) self.relay_channel_id = packet.private_channel_id