mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
module filter is expanded a tiny bit
This commit is contained in:
parent
d0a61ef581
commit
035c54350e
@ -695,7 +695,7 @@ const char *Handler::GetLastMsg()
|
|||||||
return m_MsgCache.c_str();
|
return m_MsgCache.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Handler::HandleModule(const char *module)
|
int Handler::HandleModule(const char *module, bool isClass)
|
||||||
{
|
{
|
||||||
if (m_iModFunc < 0)
|
if (m_iModFunc < 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -711,6 +711,7 @@ int Handler::HandleModule(const char *module)
|
|||||||
|
|
||||||
//temporarily set prenit
|
//temporarily set prenit
|
||||||
m_pAmx->flags |= AMX_FLAG_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);
|
amx_PushString(m_pAmx, &hea_addr, &phys_addr, module, 0, 0);
|
||||||
int err = amx_Exec(m_pAmx, &retval, m_iModFunc);
|
int err = amx_Exec(m_pAmx, &retval, m_iModFunc);
|
||||||
amx_Release(m_pAmx, hea_addr);
|
amx_Release(m_pAmx, hea_addr);
|
||||||
|
@ -167,7 +167,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
int HandleError(const char *msg);
|
int HandleError(const char *msg);
|
||||||
int HandleNative(const char *native, int index, int trap);
|
int HandleNative(const char *native, int index, int trap);
|
||||||
int HandleModule(const char *module);
|
int HandleModule(const char *module, bool isClass=false);
|
||||||
public:
|
public:
|
||||||
bool IsHandling() const { return m_Handling; }
|
bool IsHandling() const { return m_Handling; }
|
||||||
void SetErrorMsg(const char *msg);
|
void SetErrorMsg(const char *msg);
|
||||||
|
@ -473,7 +473,7 @@ int CheckModules(AMX *amx, char error[128])
|
|||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
if (pHandler->HandleModule(buffer))
|
if (pHandler->HandleModule(buffer, (expect == LibType_Class)))
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ int CheckModules(AMX *amx, char error[128])
|
|||||||
{
|
{
|
||||||
if ( (err=RunLibCommand(&dec)) != LibErr_None )
|
if ( (err=RunLibCommand(&dec)) != LibErr_None )
|
||||||
{
|
{
|
||||||
if (!pHandler->HandleModule(buffer))
|
if (!pHandler->HandleModule(buffer, (err == LibErr_NoClass)))
|
||||||
{
|
{
|
||||||
const char *type = "Module/Library";
|
const char *type = "Module/Library";
|
||||||
if (err == LibErr_NoClass)
|
if (err == LibErr_NoClass)
|
||||||
|
Loading…
Reference in New Issue
Block a user