IRC Echo problem
#1

Ok, so I've just started re-writing my IRC echo script from to 0.2x to upgrade it to 0.3. I'm using Incognito's really nice, IRC plug-in. The problem is this:

pawn Код:
public
    IRC_OnConnect(botid)
{
    printf("*** IRC_OnConnect: Bot ID %d connected!", botid);
    // Join the channel
    JoinChannels(botid);
    // Add the bot to the group
    IRC_AddToGroup(gGroupID, botid);
    return 1;
}

forward
    JoinChannels(botid);
public
    JoinChannels(botid)
{
    IRC_JoinChannel(botid, IRC_CHANNEL);
    IRC_JoinChannel(botid, CHAT_CHAN);
    IRC_JoinChannel(botid, VIP_CHAN);
    IRC_JoinChannel(botid, CREW_CHAN);
    return 1;
}
The function I created above is supposed to join the bots to all channels, but they only join the first one (IRC_CHANNEL). What am I doing wrong here?
Reply
#2

Bump. Someone got some help?
Reply
#3

I think it someone is made to prevent flooding bots. Try using a timer delay of 2-5sec.
Reply
#4

Quote:
Originally Posted by //exora
I think it someone is made to prevent flooding bots. Try using a timer delay of 2-5sec.
I tired that last night when I got no replies in this topic

pawn Код:
public
    IRC_OnConnect(botid)
{
    printf("*** IRC_OnConnect: Bot ID %d connected!", botid);
    // Join the channel
    SetTimerEx("JoinChannels", 5000, 0, "i", botid);
    // Add the bot to the group
    IRC_AddToGroup(gGroupID, botid);
    return 1;
}

forward
    JoinChannels(botid);
public
    JoinChannels(botid)
{
    IRC_JoinChannel(botid, IRC_CHANNEL);
    IRC_JoinChannel(botid, CHAT_CHAN);
    IRC_JoinChannel(botid, VIP_CHAN);
    IRC_JoinChannel(botid, CREW_CHAN);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)