equal
deleted
inserted
replaced
359 #ifdef USE_XFIRE |
359 #ifdef USE_XFIRE |
360 void HWForm::updateXfire(void) |
360 void HWForm::updateXfire(void) |
361 { |
361 { |
362 if(hwnet && (hwnet->clientState() != HWNewNet::Disconnected)) |
362 if(hwnet && (hwnet->clientState() != HWNewNet::Disconnected)) |
363 { |
363 { |
364 xfire_setvalue(XFIRE_SERVER, !hwnet->getHost().compare(QString("netserver.hedgewars.org:%1").arg(NETGAME_DEFAULT_PORT)) ? "Official server" : hwnet->getHost().toAscii()); |
364 xfire_setvalue(XFIRE_SERVER, !hwnet->getHost().compare(QString("%1:%2").arg(NETGAME_DEFAULT_SERVER).arg(NETGAME_DEFAULT_PORT)) ? "Official server" : hwnet->getHost().toAscii()); |
365 switch(hwnet->clientState()) |
365 switch(hwnet->clientState()) |
366 { |
366 { |
367 case HWNewNet::Connecting: // Connecting |
367 case HWNewNet::Connecting: // Connecting |
368 case HWNewNet::Connected: |
368 case HWNewNet::Connected: |
369 xfire_setvalue(XFIRE_STATUS, "Connecting"); |
369 xfire_setvalue(XFIRE_STATUS, "Connecting"); |
1012 _NetConnect(host, port, ui.pageOptions->editNetNick->text().trimmed()); |
1012 _NetConnect(host, port, ui.pageOptions->editNetNick->text().trimmed()); |
1013 } |
1013 } |
1014 |
1014 |
1015 void HWForm::NetConnectOfficialServer() |
1015 void HWForm::NetConnectOfficialServer() |
1016 { |
1016 { |
1017 NetConnectServer("netserver.hedgewars.org", NETGAME_DEFAULT_PORT); |
1017 NetConnectServer(NETGAME_DEFAULT_SERVER, NETGAME_DEFAULT_PORT); |
1018 } |
1018 } |
1019 |
1019 |
1020 void HWForm::NetPassword(const QString & nick) |
1020 void HWForm::NetPassword(const QString & nick) |
1021 { |
1021 { |
1022 Q_UNUSED(nick); |
1022 Q_UNUSED(nick); |
1343 connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig())); |
1343 connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig())); |
1344 |
1344 |
1345 //nick and pass stuff |
1345 //nick and pass stuff |
1346 QString nickname = config->value("net/nick", "").toString(); |
1346 QString nickname = config->value("net/nick", "").toString(); |
1347 |
1347 |
1348 hwnet->m_private_game = !(hostName == "netserver.hedgewars.org" && port == NETGAME_DEFAULT_PORT); |
1348 hwnet->m_private_game = !(hostName == NETGAME_DEFAULT_SERVER && port == NETGAME_DEFAULT_PORT); |
1349 if (hwnet->m_private_game == false) |
1349 if (hwnet->m_private_game == false) |
1350 if (AskForNickAndPwd() != 0) |
1350 if (AskForNickAndPwd() != 0) |
1351 return; |
1351 return; |
1352 |
1352 |
1353 ui.pageRoomsList->setUser(nickname); |
1353 ui.pageRoomsList->setUser(nickname); |