module filter is expanded a tiny bit

This commit is contained in:
David Anderson 2006-05-11 10:05:42 +00:00
parent d0a61ef581
commit 035c54350e
3 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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)