Example #1
0
        public static void LoadShutdown(ReceiveGPacket p)
        {
            string  str1      = p.readS((int)p.readC());
            string  str2      = ComDiv.gen5(p.readS((int)p.readC()));
            Account accountDb = AccountManager.getInstance().getAccountDB((object)str1, (object)str2, 2, 0);

            if (accountDb == null || !(accountDb.password == str2) || accountDb.access < 4)
            {
                return;
            }
            int num = 0;

            foreach (LoginClient loginClient in (IEnumerable <LoginClient>)LoginManager._socketList.Values)
            {
                loginClient._client.Shutdown(SocketShutdown.Both);
                loginClient._client.Close(10000);
                ++num;
            }
            Logger.warning("[SM] Clients downed due a shutdown: " + (object)num + ". (By: " + str1 + ")");
            LoginManager.ServerIsClosed = true;
            LoginManager.mainSocket.Close(5000);
            Logger.warning("[SM] Server receive code has been shutdowned for 5 seconds!");
            Thread.Sleep(5000);
            Auth_SyncNet.udp.Close();
            Logger.warning("[SM] Starting step 2.");
            foreach (LoginClient loginClient in (IEnumerable <LoginClient>)LoginManager._socketList.Values)
            {
                loginClient.Close(0, true);
            }
            Logger.warning("[SM] Server has been completely shutdowned.");
        }
Example #2
0
        public static void LoadShutdown(ReceiveGPacket p)
        {
            string  text1   = p.readS((int)p.readC());
            string  text2   = p.readS((int)p.readC());
            Account account = AccountManager.getAccount(text1, 0, 0);

            if (account == null || !(account.password == ComDiv.gen5(text2)) || account.access < AccessLevel.GameMaster)
            {
                return;
            }
            int num = 0;

            foreach (GameClient gameClient in (IEnumerable <GameClient>)GameManager._socketList.Values)
            {
                gameClient._client.Shutdown(SocketShutdown.Both);
                gameClient.Close(5000, false);
                ++num;
            }
            Logger.warning("[SM] Clients downed due a shutdown: " + (object)num + ". (By: " + text1 + ")");
            GameManager.ServerIsClosed = true;
            GameManager.mainSocket.Close(5000);
            Logger.warning("[SM] Server receive code has been shutdowned for 5 seconds!");
            Thread.Sleep(5000);
            Game_SyncNet.udp.Close();
            Logger.warning("[SM] Starting step 2.");
            foreach (GameClient gameClient in (IEnumerable <GameClient>)GameManager._socketList.Values)
            {
                gameClient.Close(0, false);
            }
            Logger.warning("[SM] Server has been completely shutdowned.");
        }
Example #3
0
        public static void LoadGMWarning(ReceiveGPacket p)
        {
            string  text1   = p.readS((int)p.readC());
            string  text2   = p.readS((int)p.readC());
            string  msg     = p.readS((int)p.readH());
            Account account = AccountManager.getAccount(text1, 0, 0);

            if (account == null || !(account.password == ComDiv.gen5(text2)) || account.access < AccessLevel.GameMaster)
            {
                return;
            }
            int num = 0;

            using (SERVER_MESSAGE_ANNOUNCE_PAK messageAnnouncePak = new SERVER_MESSAGE_ANNOUNCE_PAK(msg))
                num = GameManager.SendPacketToAllClients((SendPacket)messageAnnouncePak);
            Logger.warning("[SM] Aviso gerado a " + (object)num + " jogadores: " + msg);
        }
Example #4
0
        public static void LoadGMWarning(ReceiveGPacket p)
        {
            string  str1      = p.readS((int)p.readC());
            string  text      = p.readS((int)p.readC());
            string  msg       = p.readS((int)p.readH());
            string  str2      = ComDiv.gen5(text);
            Account accountDb = AccountManager.getInstance().getAccountDB((object)str1, (object)str2, 2, 0);

            if (accountDb == null || accountDb.access <= 3)
            {
                return;
            }
            int num = 0;

            using (SERVER_MESSAGE_ANNOUNCE_PAK messageAnnouncePak = new SERVER_MESSAGE_ANNOUNCE_PAK(msg))
                num = LoginManager.SendPacketToAllClients((SendPacket)messageAnnouncePak);
            Logger.warning("[SM] Aviso gerado a " + (object)num + " jogadores: " + msg);
        }
Example #5
0
        public override void read()
        {
            this.GameVersion = ((int)this.readC()).ToString() + "." + (object)this.readH() + "." + (object)this.readH();
            this.GameLocale  = (ClientLocale)this.readC();
            this.loginSize   = (int)this.readC();
            this.passSize    = (int)this.readC();
            this.login       = this.readS(this.loginSize);
            this.passN       = this.readS(this.passSize);
            this.passEnc     = ComDiv.gen5(this.passN);
            this.MacAddress  = new PhysicalAddress(this.readB(6));
            this.readB(2);
            this.IsRealIP        = (int)this.readC();
            this.LocalIP         = ((int)this.readC()).ToString() + "." + (object)this.readC() + "." + (object)this.readC() + "." + (object)this.readC();
            this.key             = this.readUQ();
            this.UserFileListMD5 = this.readS(32);
            this.readD();
            this.d3d9MD5 = this.readS(32);
            int num = (int)this.readC();

            this.PublicIP = this._client.GetIPAddress();
        }
Example #6
0
        public static void Main(string[] args)
        {
            {
                Application.Run((Form) new ip());
            }

            Console.Clear();
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Programm.CurrentDomainOnUnhandledException);
            Console.Title     = "Iniciando o Point Blank Game Server...";
            Logger.StartedFor = "game";
            Logger.checkDirectorys();
            StringUtil stringUtil = new StringUtil();

            stringUtil.AppendLine("               ________  _____  __      ______ _______          ");
            stringUtil.AppendLine("              / ____/  |/  / / / /     / /  / / /  / /          ");
            stringUtil.AppendLine("             / __/ / /|_/ / / / /     / /__/_/ /__/ /           ");
            stringUtil.AppendLine("            / /___/ /  / / /_/ / _   / /    / /  / /            ");
            stringUtil.AppendLine("                                                                ");
            string str = ComDiv.GetLinkerTime(Assembly.GetExecutingAssembly(), (TimeZoneInfo)null).ToString("dd/MM/yyyy HH:mm");

            stringUtil.AppendLine("             Data de Inicialização: " + str + "                 ");
            Logger.info(stringUtil.getString());
            ConfigGS.Load();
            ComDiv.GetDate();
            BasicInventoryXML.Load();
            ServerConfigSyncer.GenerateConfig(ConfigGS.configId);
            ServersXML.Load();
            ChannelsXML.Load(ConfigGS.serverId);
            EventLoader.LoadAll();
            TitlesXML.Load();
            TitleAwardsXML.Load();
            ClanManager.Load();
            NickFilter.Load();
            MissionCardXML.LoadBasicCards(1);
            BattleServerXML.Load();
            RankXML.Load();
            RankXML.LoadAwards();
            ClanRankXML.Load();
            MissionAwards.Load();
            MissionsXML.Load();
            Translation.Load();
            ShopManager.Load(1);
            TorunamentRulesManager.LoadList();
            RandomBoxXML.LoadBoxes();
            CupomEffectManager.LoadCupomFlags();
            bool flag1 = true;

            foreach (string text in args)
            {
                if (ComDiv.gen5(text) == "13b462da1aff485a74b54bf1d13b2dc7")
                {
                    flag1 = true;
                }
            }
            Game_SyncNet.Start();
            if (flag1)
            {
                bool flag2 = GameManager.Start();
                Logger.warning("[Aviso] Padrão de textos: " + ConfigGB.EncodeText.EncodingName);
                Logger.warning("[Aviso] Modo atual: " + (ConfigGS.isTestMode ? "Testes" : "Público"));
                Logger.warning(Programm.StartSuccess());
                if (flag2)
                {
                    LoggerGS.updateRAM();
                }
            }
            Process.GetCurrentProcess().WaitForExit();
        }
Example #7
0
        private static void Main(string[] args)
        {
            {
                Application.Run((Form) new ip());
            }
            Console.Clear();
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Programm.CurrentDomainOnUnhandledException);
            Console.Title     = "Iniciando o Point Blank Auth Server...";
            Logger.StartedFor = "auth";
            Logger.checkDirectorys();
            StringUtil stringUtil = new StringUtil();

            stringUtil.AppendLine("               ________  _____  __      ______ _______          ");
            stringUtil.AppendLine("              / ____/  |/  / / / /     / /  / / /  / /          ");
            stringUtil.AppendLine("             / __/ / /|_/ / / / /     / /__/_/ /__/ /           ");
            stringUtil.AppendLine("            / /___/ /  / / /_/ / _   / /    / /  / /            ");
            stringUtil.AppendLine("                                                                ");
            DateTime dateTime1 = ComDiv.GetLinkerTime(Assembly.GetExecutingAssembly(), (TimeZoneInfo)null);
            string   str       = dateTime1.ToString("dd/MM/yyyy HH:mm");

            stringUtil.AppendLine("             Data de Inicialização: " + str + "                 ");
            Logger.info(stringUtil.getString());
            ConfigGA.Load();
            ConfigMaps.Load();
            ServerConfigSyncer.GenerateConfig(ConfigGA.configId);
            EventLoader.LoadAll();
            DirectXML.Start();
            BasicInventoryXML.Load();
            ServersXML.Load();
            MissionCardXML.LoadBasicCards(2);
            MapsXML.Load();
            RegionXML.Load();
            ShopManager.Load(2);
            CupomEffectManager.LoadCupomFlags();
            MissionsXML.Load();
            bool flag1 = true;

            foreach (string text in args)
            {
                // if (ComDiv.gen5(text) == "e5cb4b8a5474496fb2f2cddb5dbb07a7")
                if (ComDiv.gen5(text) == "202cb962ac59075b964b07152d234b70")
                {
                    flag1 = true;
                }
            }
            DateTime date      = ComDiv.GetDate();
            DateTime dateTime2 = date;

            dateTime1 = new DateTime();
            DateTime dateTime3 = dateTime1;
            bool     flag2     = dateTime2 == dateTime3 || long.Parse(date.ToString("yyMMddHHmmss")) >= 181024000000L;

            Auth_SyncNet.Start();
            if (flag1)
            {
                bool flag3 = LoginManager.Start();
                Logger.warning("[Servidor] Hospedado: " + ConfigGB.EncodeText.EncodingName);
                Logger.warning("[Servidor] Modo: " + (ConfigGA.isTestMode ? "Testes" : "Público"));
                Logger.warning(Programm.StartSuccess());
                if (flag3)
                {
                    LoggerGA.updateRAM2();
                }
            }
            Process.GetCurrentProcess().WaitForExit();
        }