Exemplo n.º 1
0
        public override bool GetControl(string pass)
        {
            ThrowIfDisposed();
            bool isSuccess = false;

            Rcon = RconGoldSource.Authorize(ConInfo, pass);
            if (Rcon != null)
            {
                isSuccess = true;
            }
            return(isSuccess);
        }
Exemplo n.º 2
0
        internal static Rcon Authorize(ConnectionInfo conInfo, string pass)
        {
            var Obj = new RconGoldSource(conInfo);

            Obj.ChallengeId = Obj.GetChallengeId();
            Obj.RConPass    = pass;
            if (Obj != null)
            {
                var reply = Obj.SendCommand("");
                if (reply != null && !reply.Contains("Bad rcon_password"))
                {
                    return(Obj);
                }
            }
            Obj.Dispose();
            return(null);
        }