attempt for bug am44778 - plugin_log() did not function in logevents properly

This commit is contained in:
David Anderson 2006-09-13 06:36:59 +00:00
parent d925dc6e41
commit 87c3e1dc82
2 changed files with 11 additions and 3 deletions

View File

@ -454,6 +454,11 @@ const char *CForwardMngr::getFuncName(int id) const
return (id & 1) ? m_SPForwards[id >> 1]->getFuncName() : m_Forwards[id >> 1]->getFuncName();
}
int CForwardMngr::getFuncsNum(int id) const
{
return (id & 1) ? m_SPForwards[id >> 1]->getFuncsNum() : m_Forwards[id >> 1]->getFuncsNum();
}
int CForwardMngr::getParamsNum(int id) const
{
return (id & 1) ? m_SPForwards[id >> 1]->getParamsNum() : m_Forwards[id >> 1]->getParamsNum();

View File

@ -1216,8 +1216,11 @@ void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...)
at_logged // Server print to console ( only in multiplayer games ).
*/
cell retVal = 0;
// execute logevents and plugin_log forward
if (g_logevents.logEventsExist())
if (g_logevents.logEventsExist()
|| g_forwards.getFuncsNum(FF_PluginLog))
{
va_list logArgPtr;
va_start(logArgPtr, szFmt);
@ -1229,9 +1232,9 @@ void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...)
{
g_logevents.executeLogEvents();
}
}
cell retVal = executeForwards(FF_PluginLog);
retVal = executeForwards(FF_PluginLog);
}
if (retVal)
{