Exemplo n.º 1
0
        public void OnDoKick()
        {
            if (string.IsNullOrEmpty(kickReasonField.text))
            {
                Logger.LogError("Kick reason field needs to be completed!", Category.Admin);
                return;
            }

            RequestKickMessage.Send(playerToKickCache.uid, kickReasonField.text, announceBan: kickAnnounceToggle.isOn);

            ClosePage();
        }
Exemplo n.º 2
0
        public void OnDoKick()
        {
            if (string.IsNullOrEmpty(kickReasonField.text))
            {
                Logger.LogError("Kick reason field needs to be completed!", Category.Admin);
                return;
            }

            RequestKickMessage.Send(ServerData.UserID, PlayerList.Instance.AdminToken, playerToKickCache.uid,
                                    kickReasonField.text);

            ClosePage();
        }
Exemplo n.º 3
0
    public static RequestKickMessage Send(string userId, string adminToken, string userIDToKick, string reason,
                                          bool ban = false, int banminutes = 0)
    {
        RequestKickMessage msg = new RequestKickMessage
        {
            Userid     = userId,
            AdminToken = adminToken,
            UserToKick = userIDToKick,
            Reason     = reason,
            IsBan      = ban,
            BanMinutes = banminutes
        };

        msg.Send();
        return(msg);
    }
Exemplo n.º 4
0
        public void OnDoBan()
        {
            if (string.IsNullOrEmpty(banReasonField.text))
            {
                Logger.LogError("Ban reason field needs to be completed!", Category.Admin);
                return;
            }

            if (string.IsNullOrEmpty(minutesField.text))
            {
                Logger.LogError("Duration field needs to be completed!", Category.Admin);
                return;
            }

            int minutes;

            int.TryParse(minutesField.text, out minutes);
            RequestKickMessage.Send(playerToKickCache.uid, banReasonField.text, true, minutes, announceBan: banAnnounceToggle.isOn);
            ClosePage();
        }
Exemplo n.º 5
0
        public void OnDoBan()
        {
            if (string.IsNullOrEmpty(banReasonField.text))
            {
                Logger.LogError("Ban reason field needs to be completed!", Category.Admin);
                return;
            }

            if (string.IsNullOrEmpty(minutesField.text))
            {
                Logger.LogError("Duration field needs to be completed!", Category.Admin);
                return;
            }

            int minutes;

            int.TryParse(minutesField.text, out minutes);
            RequestKickMessage.Send(ServerData.UserID, PlayerList.Instance.AdminToken, playerToKickCache.uid,
                                    banReasonField.text, true, minutes);
            ClosePage();
        }