fixed bug am44544 (log forward broken)

This commit is contained in:
David Anderson 2006-09-10 01:08:29 +00:00
parent 4599b59834
commit 418efa4088
2 changed files with 53 additions and 8 deletions

View File

@ -1229,16 +1229,16 @@ void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...)
{ {
g_logevents.executeLogEvents(); g_logevents.executeLogEvents();
} }
cell retVal = executeForwards(FF_PluginLog);
if (retVal)
{
RETURN_META(MRES_HANDLED);
}
} }
RETURN_META(MRES_IGNORED); cell retVal = executeForwards(FF_PluginLog);
if (retVal)
{
RETURN_META(MRES_SUPERCEDE);
}
RETURN_META(MRES_IGNORED);
} }
void C_ChangeLevel(char *map, char *what) void C_ChangeLevel(char *map, char *what)

View File

@ -0,0 +1,45 @@
#include <amxmodx>
new g_BlockLog
public plugin_init()
{
register_plugin("Log Tester", "1.0", "BAILOPAN")
register_srvcmd("log_addlogevent", "Command_AddLogEvent")
register_srvcmd("log_setblock", "Command_LogSetBlock")
}
public event_round_start()
{
}
public Command_LogSetBlock()
{
if (read_argc() < 2)
{
server_print("Specify 1 or 0.")
return PLUGIN_HANDLED
}
new temp[12]
read_argv(1, temp, 11)
g_BlockLog = str_to_num(temp) ? true : false
return PLUGIN_HANDLED
}
public plugin_log()
{
server_print("Got log event! Blocking: %d", g_BlockLog)
return g_BlockLog ? PLUGIN_HANDLED : PLUGIN_CONTINUE
}
public Command_AddLogEvent(id)
{
register_logevent("event_round_start", 2, "0=World triggered", "1=Round_Start")
return PLUGIN_HANDLED
}