Exemplo n.º 1
0
        public void Execute(ISender commandSender, string commandLabel, string[] args)
        {
            if (args.Length < 2)
            {
                return;
            }

            Guid id = ProfileCache.Instance.ParseEmailToGuid(args[1].ToLower());

            if (id.Equals(Guid.Empty))
            {
                PacChatServer.GetServer().Logger.Error("Email is not exists.");
                return;
            }

            ChatUser user = ChatUserManager.LoadUser(id);

            user.Banned = true;

            user.Save();

            if (user.IsOnline())
            {
                user.Kick();
            }
        }