equal
deleted
inserted
replaced
430 pnetserver = new HWNetServer; |
430 pnetserver = new HWNetServer; |
431 pnetserver->StartServer(ui.pageNetServer->sbPort->value()); |
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", ui.pageNetServer->sbPort->value()); |
435 pRegisterServer = new HWNetUdpServer(0, ui.pageNetServer->leServerDescr->text(), ui.pageNetServer->sbPort->value()); |
436 else |
436 else |
437 pRegisterServer = new HWNetWwwServer(0, "hedgewars server", ui.pageNetServer->sbPort->value()); |
437 pRegisterServer = new HWNetWwwServer(0, ui.pageNetServer->leServerDescr->text(), ui.pageNetServer->sbPort->value()); |
438 } |
438 } |
439 |
439 |
440 void HWForm::NetDisconnect() |
440 void HWForm::NetDisconnect() |
441 { |
441 { |
442 if(hwnet) { |
442 if(hwnet) { |
444 delete hwnet; |
444 delete hwnet; |
445 hwnet=0; |
445 hwnet=0; |
446 } |
446 } |
447 if(pnetserver) { |
447 if(pnetserver) { |
448 pRegisterServer->unregister(); |
448 pRegisterServer->unregister(); |
449 pRegisterServer->deleteLater(); |
449 pRegisterServer = 0; |
|
450 |
450 pnetserver->StopServer(); |
451 pnetserver->StopServer(); |
451 delete pnetserver; |
452 delete pnetserver; |
452 pnetserver=0; |
453 pnetserver=0; |
453 } |
454 } |
454 } |
455 } |