Bots keep disconnecting
#1

Hello!
I have a irc script, when i restart the server the bots will connect to irc but after sometimes it will keep spam like this

Quote:

[02:14:00] *** IRC_OnDisconnect: Bot ID 310 attempting to reconnect...
[02:14:00] *** IRC_OnDisconnect: Bot ID 310 disconnected!
[02:14:00] *** IRC_OnDisconnect: Bot ID 579 attempting to reconnect...
[02:14:00] *** IRC_OnDisconnect: Bot ID 579 disconnected!
[02:14:00] *** IRC_OnDisconnect: Bot ID 93 attempting to reconnect...
[02:14:00] *** IRC_OnDisconnect: Bot ID 93 disconnected!
[02:14:00] *** IRC_OnDisconnect: Bot ID 515 attempting to reconnect...
[02:14:00] *** IRC_OnDisconnect: Bot ID 515 disconnected!
[02:14:00] *** IRC_OnDisconnect: Bot ID 45 attempting to reconnect...
[02:14:00] *** IRC_OnDisconnect: Bot ID 45 disconnected!
[02:14:00] *** IRC_OnDisconnect: Bot ID 493 attempting to reconnect...
[02:14:00] *** IRC_OnDisconnect: Bot ID 493 disconnected!
[02:14:00] *** IRC_OnDisconnect: Bot ID 296 attempting to reconnect...

Spamming like this is very annoying and makes the server log big (going to more than 500 MB).And at that time server lagging. Can anyone tell me a solution? no problem if the bots disconnect but i need to stop this spamming, thats all :S

Here is the code of that

pawn Code:
public IRC_OnDisconnect(botid) {
    printf("*** IRC_OnDisconnect: Bot ID %d disconnected!", botid);
    if (botid == gBotID[0]) {
        // Reset the bot ID
        gBotID[0] = 0;
        // Wait 20 seconds for the first bot
        SetTimerEx("IRC_ConnectDelay", 50000, 0, "d", 1);}
    else if (botid == gBotID[1]) {
        // Reset the bot ID
        gBotID[1] = 0;
        // Wait 25 seconds for the second bot
        SetTimerEx("IRC_ConnectDelay", 55000, 0, "d", 2);}
    else if (botid == gBotID[2]) {
        // Reset the bot ID
        gBotID[2] = 0;
        // Wait 30 seconds for the third bot
        SetTimerEx("IRC_ConnectDelay", 50000, 0, "d", 3);}
    printf("*** IRC_OnDisconnect: Bot ID %d attempting to reconnect...", botid);
    // Remove the bot from the group
    IRC_RemoveFromGroup(gGroupID, botid);
    return 1;}

public IRC_OnJoinChannel(botid, channel[]) {
    printf("*** IRC_OnJoinChannel: Bot ID %d joined channel %s!", botid, channel);
    return 1;}
Reply
#2

do you have maxnpc set to 1/amount of bots in your server.cfg?
Reply
#3

Quote:
Originally Posted by Littlehelper[MDZ]
View Post
do you have maxnpc set to 1/amount of bots in your server.cfg?
maxnpc 0
Reply
#4

maxnpc number_of_bots_goes_here.
Reply
#5

Quote:
Originally Posted by Littlehelper[MDZ]
View Post
maxnpc number_of_bots_goes_here.
Ok and for a safety can i delete these 2 line?

pawn Code:
printf("*** IRC_OnDisconnect: Bot ID %d disconnected!", botid);

printf("*** IRC_OnDisconnect: Bot ID %d attempting to reconnect...", botid);
Reply
#6

You can if you want.
Reply
#7

Quote:
Originally Posted by Littlehelper[MDZ]
View Post
You can if you want.
If i do that, then any problem?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)