BattleNet.Bncs.handleAuthCheckResult C# (CSharp) Method

handleAuthCheckResult() protected method

protected handleAuthCheckResult ( ulong result, string info ) : bool
result ulong
info string
return bool
        protected bool handleAuthCheckResult(ulong result, string info)
        {
            switch (result)
            {
                case 0x000: if (ClientlessBot.debugging) Console.WriteLine("{0}: [BNCS] Successfully logged on to Battle.net", m_owner.Account);
                    break;
                case 0x100: Console.WriteLine("{0}: [BNCS] Outdated game version", m_owner.Account);
                    break;
                case 0x101: Console.WriteLine("{0}: [BNCS] Invalid version", m_owner.Account);
                    break;
                case 0x102: Console.WriteLine("{0}: [BNCS] Game version must be downgraded to {1}", m_owner.Account, info);
                    break;
                case 0x200: Console.WriteLine("{0}: [BNCS] Invalid CD key", m_owner.Account);
                    m_owner.Status = ClientlessBot.ClientStatus.STATUS_INVALID_CD_KEY;
                    break;
                case 0x210: Console.WriteLine("{0}: [BNCS] Invalid Expansion CD key", m_owner.Account);
                    m_owner.Status = ClientlessBot.ClientStatus.STATUS_INVALID_EXP_CD_KEY;
                    break;
                case 0x201: Console.WriteLine("{0}: [BNCS] CD key is being used by {1}", m_owner.Account, info);
                    m_owner.Status = ClientlessBot.ClientStatus.STATUS_KEY_IN_USE;
                    break;
                case 0x211: Console.WriteLine("{0}: [BNCS] Expansion CD key is being used by {1}", m_owner.Account, info);
                    m_owner.Status = ClientlessBot.ClientStatus.STATUS_EXP_KEY_IN_USE;
                    break;
                case 0x202: Console.WriteLine("{0}: [BNCS] This CD key has been banned", m_owner.Account);
                    m_owner.Status = ClientlessBot.ClientStatus.STATUS_BANNED_CD_KEY;
                    break;
                case 0x212: Console.WriteLine("{0}: [BNCS] This Expansion CD key has been banned", m_owner.Account);
                    m_owner.Status = ClientlessBot.ClientStatus.STATUS_BANNED_EXP_CD_KEY;
                    break;
                case 0x203: Console.WriteLine("{0}: [BNCS] This CD key is meant to be used with another product", m_owner.Account);
                    break;
                default: Console.WriteLine("{0}: [BNCS] Failed to log on to Battle.net ({1})", m_owner.Account, result);
                    break;
            }
            if (result == 0)
            {
                if (ClientlessBot.debugging)
                    Console.WriteLine("{0}: [BNCS] Requesting ini file time", m_owner.Account);

                byte[] packet = BuildPacket((byte)0x33, BitConverter.GetBytes(0x80000004), nulls, System.Text.Encoding.UTF8.GetBytes("bnserver-D2DV.ini"), zero);

                PrintPacket(packet);

                m_stream.Write(packet, 0, packet.Length);

                return true;
            }
            return false;
        }