diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-30 16:47:03 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-30 19:23:28 -0700 |
commit | 7c5c2058e9aea996dc6c76a7e6d9ba4fc2a2bc77 (patch) | |
tree | 961575586f475d4b47f167a2b40f865f864a0206 /src/login/login.cpp | |
parent | 71204f7324a2e01ce50007f16c46386354712ec9 (diff) | |
download | tmwa-7c5c2058e9aea996dc6c76a7e6d9ba4fc2a2bc77.tar.gz tmwa-7c5c2058e9aea996dc6c76a7e6d9ba4fc2a2bc77.tar.bz2 tmwa-7c5c2058e9aea996dc6c76a7e6d9ba4fc2a2bc77.tar.xz tmwa-7c5c2058e9aea996dc6c76a7e6d9ba4fc2a2bc77.zip |
It's about time I did this
Diffstat (limited to 'src/login/login.cpp')
-rw-r--r-- | src/login/login.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/login/login.cpp b/src/login/login.cpp index a8bc7a0..1d6b909 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -133,7 +133,7 @@ int save_unknown_packets = 0; static tick_t creation_time_GM_account_file; static -std::chrono::seconds gm_account_filename_check_timer = std::chrono::seconds(15); +std::chrono::seconds gm_account_filename_check_timer = 15_s; static int display_parse_login = 0; // 0: no, 1: yes @@ -151,7 +151,7 @@ Array<int, MAX_SERVERS> server_freezeflag; // Char-server anti-freeze system. static int anti_freeze_enable = 0; static -std::chrono::seconds anti_freeze_interval = std::chrono::seconds(15); +std::chrono::seconds anti_freeze_interval = 15_s; static Session *login_session; @@ -3489,7 +3489,7 @@ bool login_config(XString w1, ZString w2) { anti_freeze_interval = std::max( std::chrono::seconds(atoi(w2.c_str())), - std::chrono::seconds(5)); + 5_s); } else if (w1 == "update_host"_s) { @@ -3574,14 +3574,14 @@ bool display_conf_warnings(void) { PRINTF("***WARNING: Invalid value for gm_account_filename_check_timer parameter.\n"_fmt); PRINTF(" -> set to 15 sec (default).\n"_fmt); - gm_account_filename_check_timer = std::chrono::seconds(15); + gm_account_filename_check_timer = 15_s; rv = false; } - else if (gm_account_filename_check_timer == std::chrono::seconds(1)) + else if (gm_account_filename_check_timer == 1_s) { PRINTF("***WARNING: Invalid value for gm_account_filename_check_timer parameter.\n"_fmt); PRINTF(" -> set to 2 sec (minimum value).\n"_fmt); - gm_account_filename_check_timer = std::chrono::seconds(2); + gm_account_filename_check_timer = 2_s; rv = false; } @@ -3939,14 +3939,14 @@ int do_init(Slice<ZString> argv) login_session = make_listen_port(login_port, SessionParsers{.func_parse= parse_login, .func_delete= delete_login}); - Timer(gettick() + std::chrono::minutes(5), + Timer(gettick() + 5_min, check_auth_sync, - std::chrono::minutes(5) + 5_min ).detach(); if (anti_freeze_enable > 0) { - Timer(gettick() + std::chrono::seconds(1), + Timer(gettick() + 1_s, char_anti_freeze_system, anti_freeze_interval ).detach(); @@ -3955,7 +3955,7 @@ int do_init(Slice<ZString> argv) // add timer to check GM accounts file modification std::chrono::seconds j = gm_account_filename_check_timer; if (j == interval_t::zero()) - j = std::chrono::minutes(1); + j = 1_min; Timer(gettick() + j, check_GM_file, j).detach(); |