MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CheckServerName

Method CheckServerName

src/network/network_gui.cpp:1097–1104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1095 }
1096
1097 bool CheckServerName()
1098 {
1099 std::string str{this->name_editbox.text.GetText()};
1100 if (!NetworkValidateServerName(str)) return false;
1101
1102 SetSettingValue(GetSettingFromName("network.server_name")->AsStringSetting(), std::move(str));
1103 return true;
1104 }
1105
1106 void OnTimeout() override
1107 {

Callers

nothing calls this directly

Calls 5

SetSettingValueFunction · 0.85
GetSettingFromNameFunction · 0.85
AsStringSettingMethod · 0.80
GetTextMethod · 0.45

Tested by

no test coverage detected