예제 #1
0
        public void InvalidToChannelInfoTest()
        {
            var channelParser = new ChannelParser();

            channelParser.LoadChannelSettings();
            var channelInfo = channelParser.ToChannelInfo("207998375251935232ddqsd");

            Assert.IsNotNull(channelInfo);
            Assert.IsFalse(channelInfo.isValid);
            Assert.AreEqual("Unknown", channelInfo.server);
            Assert.AreEqual("Unknown", channelInfo.channel);
        }
예제 #2
0
        public void ToChannelInfoTest()
        {
            var channelParser = new ChannelParser();

            channelParser.LoadChannelSettings();
            var channelInfo = channelParser.ToChannelInfo("207998375251935232");

            Assert.IsNotNull(channelInfo);
            Assert.IsTrue(channelInfo.isValid);
            Assert.AreEqual("PokeMobBot - a Pokémon Go Bot", channelInfo.server);
            Assert.AreEqual("coordsbots", channelInfo.channel);
        }
예제 #3
0
        public void Start()
        {
            var settings = GlobalSettings.Load();

            _channelParser.LoadChannelSettings();

            if (settings == null)
            {
                return;
            }

            VersionCheckState.Execute(new CancellationToken());

            _clientWriter.StartNet(settings.Port);

            WebSourcesManager(settings);

            Console.Read();
        }
예제 #4
0
        public void Start()
        {
            var settings = GlobalSettings.Load();

            _channelParser.LoadChannelSettings();

            if (settings == null)
            {
                return;
            }
            GlobalSettings.Output?.SetStatus("Connecting...");

            VersionCheckState.Execute(new CancellationToken());
            if (GlobalSettings.IsServer)
            {
                Task.Run(() =>
                {
                    _server.Start();
                });
            }
            else
            {
                ClientWriter.Instance.StartNet(GlobalSettings.Port);
                Log.Info($"Starting with Port: {GlobalSettings.Port}");
            }
            if (GlobalSettings.IsManaged)
            {
                Task.Run(() =>
                {
                    _pogoClient.Start(_channelParser.Settings);
                });
                StartBotListeners();
            }
            else if (GlobalSettings.VerifyOnSkiplagged)
            {
                SkipLaggedPokemonLocationValidator.Instance.StartVerifierThread();
            }
            WebSourcesManager(settings);

            Console.Read();
        }