IRC Bot private message function
#1

Hey, could anyone tell me how i can enable my irc bots to accept or reject commands or message from certain players. I'm talking about private messages not messages in the irc channel itself.
Reply
#2

Is this what you mean?
pawn Код:
public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
    printf("*** IRC_OnUserSay (Bot ID %d): User %s (%s) sent message to %s: %s", botid, user, host, recipient, message);
    // Someone sent the first bot a private message
    if (!strcmp(recipient, BOT_1_NICKNAME))
    {
        IRC_Say(botid, user, "You sent me a PM!");
    }
    return 1;
}
On this line..
pawn Код:
if (!strcmp(recipient, BOT_1_NICKNAME))
You can change BOT_1_NICKNAME to other ones like this.. BOT_NUMBER_NICKNAME
Reply
#3

Yeah, that's what i wanted, thanks. I'm using Jacobs plugin but re-writing my irc script and updating to incognitos, so this will be perfect. Thanks again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)