88#endif
99
1010# define PLUGIN " Map Manager: Nomination"
11- # define VERSION " 0.2.0 "
11+ # define VERSION " 0.2.1 "
1212# define AUTHOR " Mistrick"
1313
1414#pragma semicolon 1
@@ -97,7 +97,11 @@ load_settings()
9797
9898 INI_SetParseEnd (parser, " ini_parse_end" );
9999 INI_SetReaders (parser, " ini_key_value" , " ini_new_section" );
100- INI_ParseFile (parser, " addons/amxmodx/configs/map_manager_settings.ini" );
100+ new bool: result = INI_ParseFile (parser, " addons/amxmodx/configs/map_manager_settings.ini" );
101+
102+ if (! result) {
103+ register_default_cmds ();
104+ }
101105}
102106public ini_new_section (INIParser: handle, const section[], bool: invalid_tokens, bool: close_bracket, bool: extra_tokens, curtok, any: data)
103107{
@@ -121,11 +125,15 @@ public ini_key_value(INIParser:handle, const key[], const value[], bool:invalid_
121125public ini_parse_end (INIParser: handle, bool: halted, any: data)
122126{
123127 if (! parser_info[MAPLIST_COMMAND_FOUND]) {
124- register_clcmd (" say maps" , " clcmd_mapslist" );
125- register_clcmd (" say /maps" , " clcmd_mapslist" );
128+ register_default_cmds ();
126129 }
127130 INI_DestroyParser (handle);
128131}
132+ register_default_cmds ()
133+ {
134+ register_clcmd (" say maps" , " clcmd_mapslist" );
135+ register_clcmd (" say /maps" , " clcmd_mapslist" );
136+ }
129137public plugin_natives ()
130138{
131139 get_mapname (g_szCurMap, charsmax (g_szCurMap));
0 commit comments