MCPcopy Create free account
hub / github.com/crossuo/crossuo / LoadLogin

Method LoadLogin

src/CrossUO.cpp:3216–3246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3214}
3215
3216void CGame::LoadLogin(astr_t &login, int &port)
3217{
3218 login = m_OverrideServerAddress;
3219 port = m_OverrideServerPort;
3220 if (m_OverrideServerPort != 0)
3221 {
3222 return;
3223 }
3224
3225 if (!g_Config.ServerAddress.empty())
3226 {
3227 login = g_Config.ServerAddress;
3228 port = g_Config.ServerPort;
3229 return;
3230 }
3231
3232 TextFileParser file(g_App.UOFilesPath("login.cfg"), "=,", "#;", "");
3233 while (!file.IsEOF())
3234 {
3235 auto strings = file.ReadTokens();
3236 if (strings.size() >= 3)
3237 {
3238 auto lo = str_lower(strings[0]);
3239 if (lo == "loginserver")
3240 {
3241 login = strings[1];
3242 port = str_to_int(strings[2]);
3243 }
3244 }
3245 }
3246}
3247
3248void CGame::GoToWebLink(const astr_t &url)
3249{

Callers

nothing calls this directly

Calls 7

str_lowerFunction · 0.85
str_to_intFunction · 0.85
UOFilesPathMethod · 0.80
ReadTokensMethod · 0.80
emptyMethod · 0.45
IsEOFMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected