示例#1
0
        public void SetCommand(Request req, int index)
        {
            switch (req.command)
            {
            case "refresh":
                server.SetRoom(server.clientsList, server.rooms, index);
                for (int z = 0; z < server.rooms.roomList.Count; z++)
                {
                    if (server.rooms.roomList[z].IsPassive(server.clientsList.ElementAt(index)))
                    {
                        Thread.Sleep(100);
                        server.rooms.roomList[z].SendForPassiv();
                    }
                }
                break;

            case "refreshclients":
                server.SetClient(server.clientsList, index);
                break;

            case "ban":
                admin.BanUser(req.data, req.time);
                break;

            case "unban":
                admin.Unban(req.data);
                break;
            }
        }
示例#2
0
        public void SetCommand(Request req, int index)
        {
            switch (req.command)
            {
            case "refresh":
                server.SetRoom(index);
                break;

            case "refreshclients":
                server.SetClient(index);
                break;

            case "ban":
                admin.BanUser(req.data, req.time);
                break;

            case "unban":
                admin.Unban(req.data);
                break;
            }
        }