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(); }
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(); }
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); }
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(); }
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(); }