コード例 #1
0
        public override bool GetControl(string pass)
        {
            ThrowIfDisposed();
            bool isSuccess = false;

            Rcon = RconGoldSource.Authorize(ConInfo, pass);
            if (Rcon != null)
            {
                isSuccess = true;
            }
            return(isSuccess);
        }
コード例 #2
0
ファイル: RconGoldSource.cs プロジェクト: voed/QueryMaster
        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);
        }