Need help making the sa-mp server send a message when someone join/leave the IRC channel.
#1

This is some of the (dont know what its called) things the irc.inc have.

IRC_Connect()
IRC_Quit()
IRC_JoinChannel()
IRC_PartChannel()
IRC_ChangeNick()
IRC_KickUser()

I would like a message for every time someone join, leave, change name, or gets kicked.
Reply
#2

All of these are basically part of the irc.pwn filterscript (that came with the include)

pawn Code:
public IRC_OnUserDisconnect(botid, user[], host[], message[])
{
    printf("*** IRC_OnUserDisconnect (Bot ID %d): User %s (%s) disconnected (%s)", botid, user, host, message);
    return 1;
}

public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
{
    printf("*** IRC_OnUserJoinChannel (Bot ID %d): User %s (%s) joined channel %s", botid, user, host, channel);
    return 1;
}

public IRC_OnUserLeaveChannel(botid, channel[], user[], host[], message[])
{
    printf("*** IRC_OnUserLeaveChannel (Bot ID %d): User %s (%s) left channel %s (%s)", botid, user, host, channel, message);
    return 1;
}

public IRC_OnUserKickedFromChannel(botid, channel[], kickeduser[], oppeduser[], oppedhost[], message[])
{
    printf("*** IRC_OnUserKickedFromChannel (Bot ID %d): User %s kicked by %s (%s) from channel %s (%s)", botid, kickeduser, oppeduser, oppedhost, channel, message);
}

public IRC_OnUserNickChange(botid, oldnick[], newnick[], host[])
{
    printf("*** IRC_OnUserNickChange (Bot ID %d): User %s (%s) changed his/her nick to %s", botid, oldnick, host, newnick);
    return 1;
}
Simply save the printf message to a string and do SendClientMessageToAll.
Reply
#3

Oh thanks alot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)