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

Method ProcessCommandLine

src/CrossUO.cpp:246–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void CGame::ProcessCommandLine()
247{
248 if (g_cli["nocrypt"].was_set())
249 {
250 g_Config.EncryptionType = ET_NOCRYPT;
251 }
252
253 if (g_cli["fastlogin"].was_set())
254 {
255 g_GameWindow.CreateTimer(FASTLOGIN_TIMER_ID, 50);
256 }
257
258 if (g_cli["autologin"].was_set())
259 {
260 g_MainScreen.m_AutoLogin->Checked = g_cli["autologin"].get().u32 != 0;
261 }
262
263 if (g_cli["savepassword"].was_set())
264 {
265 g_MainScreen.m_SavePassword->Checked = g_cli["savepassword"].get().u32 != 0;
266 }
267
268 if (g_cli["host"].was_set())
269 {
270 m_OverrideServerAddress = g_cli["host"].get().string;
271 m_OverrideServerPort = g_cli["port"].get().u32;
272 }
273
274 if (g_cli["port"].was_set())
275 {
276 m_OverrideServerPort = g_cli["port"].get().u32;
277 }
278
279 if (g_cli["proxy-host"].was_set() && g_cli["proxy-port"].was_set())
280 {
281 g_ConnectionManager.SetUseProxy(true);
282 g_ConnectionManager.SetProxyAddress(g_cli["proxy-host"].get().string);
283 g_ConnectionManager.SetProxyPort(g_cli["proxy-port"].get().u32);
284 }
285
286 if (g_cli["proxy-user"].was_set())
287 {
288 g_ConnectionManager.SetProxySocks5(true);
289 g_ConnectionManager.SetProxyAccount(g_cli["proxy-user"].get().string);
290 }
291
292 if (g_cli["proxy-password"].was_set())
293 {
294 g_ConnectionManager.SetProxyPassword(g_cli["proxy-password"].get().string);
295 }
296
297 if (g_cli["login"].was_set())
298 {
299 auto l = g_cli["login"].get().string;
300 auto p = g_cli["password"].get().string;
301 g_MainScreen.SetAccounting(l, p);
302 }
303

Callers 1

mainFunction · 0.80

Calls 11

was_setMethod · 0.80
CreateTimerMethod · 0.80
getMethod · 0.80
SetUseProxyMethod · 0.80
SetProxyAddressMethod · 0.80
SetProxyPortMethod · 0.80
SetProxySocks5Method · 0.80
SetProxyAccountMethod · 0.80
SetProxyPasswordMethod · 0.80
SetAccountingMethod · 0.80
lengthMethod · 0.80

Tested by

no test coverage detected