private void VerifyMentorStatus(NetMessage msg)
        {
            if (IsFromAdmin() == false && PlayerList.Instance.IsMentor(SentByPlayer.UserId) == false)
            {
                return;
            }

            var recipient = PlayerList.Instance.GetAllByUserID(msg.UserToBwoink);

            foreach (var r in recipient)
            {
                MentorBwoinkMessage.Send(r.GameObject, SentByPlayer.UserId, $"<color=#6400FF>{msg.Message}</color>");
                UIManager.Instance.adminChatWindows.mentorPlayerChat.ServerAddChatRecord(msg.Message, msg.UserToBwoink, SentByPlayer.UserId);
            }
        }
Ejemplo n.º 2
0
        void VerifyMentorStatus(NetMessage msg)
        {
            var player = PlayerList.Instance.GetMentor(msg.Userid, msg.MentorToken);

            if (player == null)
            {
                player = PlayerList.Instance.GetAdmin(msg.Userid, msg.MentorToken);
                if (player == null)
                {
                    //theoretically this shouldnt happen, and indicates someone might be tampering with the client.
                    return;
                }
            }
            var recipient = PlayerList.Instance.GetAllByUserID(msg.UserToBwoink);

            foreach (var r in recipient)
            {
                MentorBwoinkMessage.Send(r.GameObject, msg.Userid, "<color=#6400FF>" + msg.Message + "</color>");
                UIManager.Instance.adminChatWindows.mentorPlayerChat.ServerAddChatRecord(msg.Message, msg.UserToBwoink, msg.Userid);
            }
        }