Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public
- OnFilterScriptInit()
- {
- // Wait 5 seconds for the first bot
- SetTimerEx("IRC_ConnectDelay", 5000, 0, "d", 1);
- // Wait 10 seconds for the second bot
- SetTimerEx("IRC_ConnectDelay", 10000, 0, "d", 2);
- SetTimerEx("IRC_ConnectDelay", 15000, 0, "d", 3);
- // Create a group (the bots will be added to it upon connect)
- gGroupID = IRC_CreateGroup();
- }
- forward
- IRC_ConnectDelay(tempid);
- public
- IRC_ConnectDelay(tempid)
- {
- switch (tempid)
- {
- case 1:
- {
- // Connect the first bot
- gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
- }
- case 2:
- {
- // Connect the second bot
- gBotID[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
- }
- case 3:
- {
- // Connect the second bot
- gBotID[2] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_3_NICKNAME, BOT_3_REALNAME, BOT_3_USERNAME);
- }
- }
- return 1;
- }
- public
- OnFilterScriptExit()
- {
- // Disconnect the first bot
- IRC_Quit(gBotID[0], "Client Exited");
- // Disconnect the second bot
- IRC_Quit(gBotID[1], "Client Exited");
- IRC_Quit(gBotID[2], "Broken Pipe");
- // Destroy the group
- IRC_DestroyGroup(gGroupID);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement