mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
fixed bug am44544 (log forward broken)
This commit is contained in:
parent
4599b59834
commit
418efa4088
@ -1229,13 +1229,13 @@ void C_AlertMessage(ALERT_TYPE atype, char *szFmt, ...)
|
|||||||
{
|
{
|
||||||
g_logevents.executeLogEvents();
|
g_logevents.executeLogEvents();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cell retVal = executeForwards(FF_PluginLog);
|
cell retVal = executeForwards(FF_PluginLog);
|
||||||
|
|
||||||
if (retVal)
|
if (retVal)
|
||||||
{
|
{
|
||||||
RETURN_META(MRES_HANDLED);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
|
45
plugins/testsuite/logtest.sma
Normal file
45
plugins/testsuite/logtest.sma
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user