Пример #1
0
        private void GetBans(BanListRequest req)
        {
            if (req.token != _token)
            {
                _authed = false;
                return;
            }
            SendToken();

            var banspath = Path.Combine(_api.Settings.BePath, "bans.txt");

            if (!File.Exists(banspath))
            {
                SendError("Could not load bans.txt");
                return;
            }

            var bans = File.ReadAllLines(banspath);
            var res  = new WSBanListPacket(bans);

            Send(res.ToString());
        }
Пример #2
0
        private void GetBans(BanListRequest req)
        {
            if (req.token != _token)
            {
                _authed = false;
                return;
            }
            SendToken();

            var banspath = Path.Combine(_api.Settings.BePath, "bans.txt");
            if (!File.Exists(banspath))
            {
                SendError("Could not load bans.txt");
                return;
            }

            var bans = File.ReadAllLines(banspath);
            var res = new WSBanListPacket(bans);
            Send(res.ToString());
        }