Esempio n. 1
0
        public async Task Process(KickFromServer kick)
        {
            if (!IsLoggedIn)
            {
                return;
            }

            ConnectedUser connectedUser;

            if (server.ConnectedUsers.TryGetValue(kick.Name, out connectedUser))
            {
                if (!User.IsAdmin)
                {
                    await Respond("No rights to execute kick");

                    return;
                }

                await server.KickFromServer(Name, kick.Name, kick.Reason);
            }
        }