22.06.2012, 02:03
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
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
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... |
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;}