33#include < map_manager_scheduler>
44
55# define PLUGIN " Map Manager: Online checker"
6- # define VERSION " 1.0.2 "
6+ # define VERSION " 1.0.3 "
77# define AUTHOR " Sergey Shorokhov"
88
99#pragma semicolon 1
@@ -27,7 +27,8 @@ new g_pCvars[Cvars];
2727new g_CurrentMap[MapStruct];
2828new g_Warnings;
2929
30- public plugin_init () {
30+ public plugin_init ()
31+ {
3132 register_plugin (PLUGIN, VERSION + VERSION_HASH, AUTHOR);
3233
3334 g_pCvars[CHECK_INTERVAL] = register_cvar (" mapm_online_check_interval" , " 30" );
@@ -37,11 +38,16 @@ public plugin_init() {
3738 get_mapname (g_CurrentMap[Map], charsmax (g_CurrentMap[Map]));
3839}
3940
40- public plugin_cfg () {
41+ public plugin_cfg ()
42+ {
4143 mapm_get_prefix (g_sPrefix, charsmax (g_sPrefix));
4244}
4345
44- public task_check_online () {
46+ public task_check_online ()
47+ {
48+ if (is_vote_will_in_next_round () || is_vote_started () || is_vote_finished ()) {
49+ return ;
50+ }
4551 if (get_num (CHECKS_COUNT) <= 0 ) {
4652 return ;
4753 }
@@ -63,7 +69,8 @@ public task_check_online() {
6369 map_scheduler_start_vote (VOTE_BY_INCORRECT_ONLINE);
6470}
6571
66- public mapm_maplist_loaded (Array: maplist, const nextmap[]) {
72+ public mapm_maplist_loaded (Array: maplist, const nextmap[])
73+ {
6774 remove_task (TASK_CHECK_ONLINE);
6875
6976 new idx = mapm_get_map_index (g_CurrentMap[Map]);
@@ -76,7 +83,8 @@ public mapm_maplist_loaded(Array: maplist, const nextmap[]) {
7683 ArrayGetArray (maplist, idx, g_CurrentMap);
7784}
7885
79- public mapm_can_be_extended (type) {
86+ public mapm_can_be_extended (type)
87+ {
8088 if (type != VOTE_BY_INCORRECT_ONLINE) {
8189 return EXTEND_ALLOWED;
8290 }
0 commit comments