Exemplo n.º 1
0
        public void OnKick(ShPlayer player, ShPlayer target, string reason)
        {
            SvManager svManager = player.manager.svManager;

            svManager.SendToAll(Channel.Unsequenced, ClPacket.GameMessage, $"{target.fullname} Kicked: {reason}");

            svManager.KickConnection(target.svPlayer.connection);
        }
Exemplo n.º 2
0
        public void OnBan(ShPlayer player, ShPlayer target, string reason)
        {
            SvManager svManager = player.manager.svManager;

            svManager.SendToAll(Channel.Unsequenced, ClPacket.GameMessage, $"{target.fullname} Banned: {reason}");

            target.svPlayer.PlayerData.Ban(reason);
            svManager.Disconnect(target.svPlayer.connection, DisconnectTypes.Banned);
        }