private void CommandRecieved(Mas3CommandType command, string[] args) { if (!_enabled) { return; } switch (command) { case Mas3CommandType.Configuration: if (_sleeping) { StopSleep(); return; } ApplyConfig(SimpleSerializer.FromJason <Configuration>(args[0])); break; case Mas3CommandType.RequestBotStrings: _commandHandlerServer.SendCommand(Mas3CommandType.ResponseBotStrings, new[] { SimpleSerializer.ToJason(Bot.GetProfiles()), SimpleSerializer.ToJason(Bot.GetMulliganProfiles()), SimpleSerializer.ToJason(Bot.GetDiscoverProfiles()), SimpleSerializer.ToJason(Bot.GetArenaProfiles()) }); break; case Mas3CommandType.RequestDecks: if (!_gettingDecks) { _gettingDecks = true; Bot.RefreshDecks(); WaitNewDecks(); } break; case Mas3CommandType.StartSleep: StartSleep(); break; case Mas3CommandType.StartBot: Bot.StartBot(); Bot.SuspendBot(); _commandHandlerServer.SendCommand(Mas3CommandType.EnterAccount, new[] { "" }); break; case Mas3CommandType.StopBot: Bot.StopBot(); break; } }