diff --git a/amxmodx/debugger.cpp b/amxmodx/debugger.cpp index 3a3497ee..7bdc1c07 100755 --- a/amxmodx/debugger.cpp +++ b/amxmodx/debugger.cpp @@ -695,7 +695,7 @@ const char *Handler::GetLastMsg() return m_MsgCache.c_str(); } -int Handler::HandleModule(const char *module) +int Handler::HandleModule(const char *module, bool isClass) { if (m_iModFunc < 0) return 0; @@ -711,6 +711,7 @@ int Handler::HandleModule(const char *module) //temporarily set prenit m_pAmx->flags |= AMX_FLAG_PRENIT; + amx_Push(m_pAmx, isClass ? 1 : 0); amx_PushString(m_pAmx, &hea_addr, &phys_addr, module, 0, 0); int err = amx_Exec(m_pAmx, &retval, m_iModFunc); amx_Release(m_pAmx, hea_addr); diff --git a/amxmodx/debugger.h b/amxmodx/debugger.h index 7ae53343..b7da045e 100755 --- a/amxmodx/debugger.h +++ b/amxmodx/debugger.h @@ -167,7 +167,7 @@ public: public: int HandleError(const char *msg); int HandleNative(const char *native, int index, int trap); - int HandleModule(const char *module); + int HandleModule(const char *module, bool isClass=false); public: bool IsHandling() const { return m_Handling; } void SetErrorMsg(const char *msg); diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 61688e0e..592cf340 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -473,7 +473,7 @@ int CheckModules(AMX *amx, char error[128]) if (!found) { - if (pHandler->HandleModule(buffer)) + if (pHandler->HandleModule(buffer, (expect == LibType_Class))) found = true; } @@ -503,7 +503,7 @@ int CheckModules(AMX *amx, char error[128]) { if ( (err=RunLibCommand(&dec)) != LibErr_None ) { - if (!pHandler->HandleModule(buffer)) + if (!pHandler->HandleModule(buffer, (err == LibErr_NoClass))) { const char *type = "Module/Library"; if (err == LibErr_NoClass)