Hi,
For some purpose i would like to catch the string in the log like
L 05/21/2009 - 19:52:20: "NickName<1082><4294967295><>" connected, address "XXX.XXX.XXX.XXX:XXXX"
I would like to do it with register_logevent() command. But there are some tricks for this particular case. I did not found similar example. I tried several combinations but all of them don't work. I believe there is something very simple what i can't see.
Could somebody please help to bring the following code in order.
Code:
public plugin_init ()
{
register_plugin ( PLUGIN, VERSION, AUTHOR )
log_message("[AMXX] Connect_catch")
register_logevent( "event_user_connected", 3, "1=connected, address" )
return PLUGIN_CONTINUE
}
public event_user_connected()
{
new Arg0[64], Arg2[64],
read_logargv(0,Arg0,63)
read_logargv(2,Arg2,63)
log_message("[AMXX] Connect_catch:", Arg0, Arg2)
return PLUGIN_CONTINUE
}
I believe there is something wrong with comma. Maybe it makes 4 parameters instead of 3. I tried:
Code:
register_logevent( "event_user_connected", 4, "1=connected" "2=address" )
It don't work either.