QTfrontend/hwform.cpp
changeset 658 a7e625f5d9d0
parent 657 b34fc518a48a
child 659 5eafb20566f1
equal deleted inserted replaced
657:b34fc518a48a 658:a7e625f5d9d0
   426 
   426 
   427 void HWForm::NetStartServer()
   427 void HWForm::NetStartServer()
   428 {
   428 {
   429   config->SaveOptions();
   429   config->SaveOptions();
   430   pnetserver = new HWNetServer;
   430   pnetserver = new HWNetServer;
   431   pnetserver->StartServer();
   431   pnetserver->StartServer(ui.pageNetServer->sbPort->value());
   432   _NetConnect("localhost", pnetserver->getRunningPort(), ui.pageOptions->editNetNick->text());
   432   _NetConnect("localhost", pnetserver->getRunningPort(), ui.pageOptions->editNetNick->text());
   433 
   433 
   434   if (ui.pageNet->rbLocalGame->isChecked())
   434   if (ui.pageNet->rbLocalGame->isChecked())
   435     pRegisterServer = new HWNetUdpServer(0, "hedgewars server", 46631);
   435     pRegisterServer = new HWNetUdpServer(0, "hedgewars server", ui.pageNetServer->sbPort->value());
   436   else
   436   else
   437     pRegisterServer = new HWNetWwwServer(0, "hedgewars server", 46631);
   437     pRegisterServer = new HWNetWwwServer(0, "hedgewars server", ui.pageNetServer->sbPort->value());
   438 }
   438 }
   439 
   439 
   440 void HWForm::NetDisconnect()
   440 void HWForm::NetDisconnect()
   441 {
   441 {
   442   if(hwnet) {
   442   if(hwnet) {