OK, Ive tried using callfunc and i cant seem to get it to work, heres what ive got..
Code:
client_print(0, print_chat, "CLIENT ABOUT TO BE KICKED!")
callfunc_begin("inform_kick", "ircbot.amxx");
callfunc_push_str(kName);
new returnvalue = callfunc_end();
switch (returnvalue)
{
case 1 : client_print(0, print_chat, "Success")
case 2 : client_print(0, print_chat, "Runtime Error")
case 3 : client_print(0, print_chat, "Plugin not found")
case 4 : client_print(0, print_chat, "Function not found")
}
That (should) execute the 'inform_kick' function in ircbot.amxx. Note that ive put in the case for my own bug checking at the moment to see if it prints any output....i get nothing at the moment, although i know the code must be getting called because 'CLIENT ABOUT TO BE KICKED!' is displayed.
It must be something to do with the above because its not priting any of the return values after it should have executed the function
Heres the code for the 'inform_kick' function
Code:
public inform_kick(victim[])
{
new channel[64]
get_cvar_string("amx_irc_chan", channel, 63)
new output[1024]
format(output, 1023, "PRIVMSG %s :4[cz]1 %s : Kicking %s For TK Violations^n", channel, victim)
socket_send(connection, output, 1023)
}
Anyone got any suggestions, something else i should be doing ??
Thanks
Damo.