source/gproxy.cpp
/**
 * Initializes all variables from the config.
 */
Initializes all variables from the config.
Initializes all variables from the config .
void CGProxy::applyConfig ()
{
    if (!logFilePtr->isOpen() && config->getBoolean("log"))
    {
        if (!logFilePtr->open(QFile::Append | QFile::Text))
        {
            gproxyPtr->showErrorMessage("Could not open logfile: " + logFilePtr->errorString());
        }
    }
    gproxyPtr->setWar3Path(config->getString("war3path"));
    gproxyPtr->setCDKeyROC(config->getString("cdkeyroc"));
    gproxyPtr->setCDKeyTFT(config->getString("cdkeytft"));
    gproxyPtr->setServer(config->getString("server"));
    gproxyPtr->setCdKeyOwner(config->getString("cdkeysowner"));
    gproxyPtr->setPrivategamename(config->getString("privategamename"));
    gproxyPtr->setBotprefix(config->getString("botprefix"));
    cautosearch = config->getBoolean("autosearch");
    gproxyPtr->m_PlaySound = config->getBoolean("sound");
    gproxyPtr->m_joinStats = config->getBoolean("joinstats");
    gproxyPtr->setUsername(config->getString("username"));
    gproxyPtr->setPassword(config->getString("password"));
    gproxyPtr->setChannel(config->getString("channel"));
    gproxyPtr->setWar3version(config->getInt("war3version"));
    gproxyPtr->setPort(config->getInt("port"));
    gproxyPtr->setExeversion(Util::extractNumbers(config->getString("exeversion").toStdString(), 4));
    gproxyPtr->setExeversionhash(Util::extractNumbers(config->getString("exeversionhash").toStdString(), 4));
    gproxyPtr->setPasswordhashtype(config->getString("passwordhashtype"));
    gproxyPtr->setBotGameCreationStartMessage_f(config->getString("botGameCreationStartMessage"));
    gproxyPtr->setBotGameCreationEndMessage_f(config->getString("botGameCreationEndMessage"));
    emit signal_applyConfig();
}
void CGProxy :: applyConfig ( ) { if ( ! logFilePtr -> isOpen ( ) && config -> getBoolean ( " " ) ) { if ( ! logFilePtr -> open ( QFile :: Append | QFile :: Text ) ) { gproxyPtr -> showErrorMessage ( " " + logFilePtr -> errorString ( ) ) ; } } gproxyPtr -> setWar3Path ( config -> getString ( " " ) ) ; gproxyPtr -> setCDKeyROC ( config -> getString ( " " ) ) ; gproxyPtr -> setCDKeyTFT ( config -> getString ( " " ) ) ; gproxyPtr -> setServer ( config -> getString ( " " ) ) ; gproxyPtr -> setCdKeyOwner ( config -> getString ( " " ) ) ; gproxyPtr -> setPrivategamename ( config -> getString ( " " ) ) ; gproxyPtr -> setBotprefix ( config -> getString ( " " ) ) ; cautosearch = config -> getBoolean ( " " ) ; gproxyPtr -> m_PlaySound = config -> getBoolean ( " " ) ; gproxyPtr -> m_joinStats = config -> getBoolean ( " " ) ; gproxyPtr -> setUsername ( config -> getString ( " " ) ) ; gproxyPtr -> setPassword ( config -> getString ( " " ) ) ; gproxyPtr -> setChannel ( config -> getString ( " " ) ) ; gproxyPtr -> setWar3version ( config -> getInt ( " " ) ) ; gproxyPtr -> setPort ( config -> getInt ( " " ) ) ; gproxyPtr -> setExeversion ( Util :: extractNumbers ( config -> getString ( " " ) . toStdString ( ) , 4 ) ) ; gproxyPtr -> setExeversionhash ( Util :: extractNumbers ( config -> getString ( " " ) . toStdString ( ) , 4 ) ) ; gproxyPtr -> setPasswordhashtype ( config -> getString ( " " ) ) ; gproxyPtr -> setBotGameCreationStartMessage_f ( config -> getString ( " " ) ) ; gproxyPtr -> setBotGameCreationEndMessage_f ( config -> getString ( " " ) ) ; emit signal_applyConfig ( ) ; }
Initializes all variables from the config.
Initializes all variables from the config .