diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index e7d76bc7..7002bab6 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -157,33 +157,38 @@ void ParseAndOrAdd(CStack & files, const char *name) { if (strncmp(name, "plugins-", 8) == 0) { +#if !defined WIN32 size_t len = strlen(name); if (strcmp(&name[len-4], ".ini") == 0) { +#endif String *pString = new String(name); files.push(pString); +#if !defined WIN32 } +#endif } } void BuildPluginFileList(CStack & files) { char path[255]; - build_pathname_r(path, sizeof(path)-1, "%s/", get_localinfo("amxx_configsdir", "addons/amxmodx/configs")); #if defined WIN32 + build_pathname_r(path, sizeof(path)-1, "%s/*.ini", get_localinfo("amxx_configsdir", "addons/amxmodx/configs")); _finddata_t fd; intptr_t handle = _findfirst(path, &fd); if (handle < 0) return; - while (_findnext(handle, &fd) < 0) + while (!_findnext(handle, &fd)) { ParseAndOrAdd(files, fd.name); } _findclose(handle); #elif defined __linux__ + build_pathname_r(path, sizeof(path)-1, "%s/", get_localinfo("amxx_configsdir", "addons/amxmodx/configs")); struct dirent *ep; DIR *dp; diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index b65eed11..13f7cd31 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -480,7 +480,7 @@ int CheckModules(AMX *amx, char error[128]) { if (expect == LibType_Library) { - if (!LoadModule(buffer, PT_ANYTIME)) + if (!LoadModule(buffer, PT_ANYTIME, true, true)) { if (pHandler->HandleModule(buffer, (expect == LibType_Class))) found = true;