Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IRC_OnConnect(botid)
- {
- new msg[512];
- if(botid == IRC_EchoConnection[0])
- {
- print("[IRC] Socket 1 established");
- format(msg,sizeof(msg), "Privmsg Nickserv identify %s",BotPass);
- IRC_SendRaw(IRC_EchoConnection[0], msg);
- IRC_JoinChannel(IRC_EchoConnection[0], EchoChan);
- IRC_JoinChannel(IRC_EchoConnection[0], EchoChan2);
- }
- else if(botid == IRC_EchoConnection[1])
- {
- print("[IRC] Socket 2 established");
- format(msg,sizeof(msg), "Privmsg Nickserv identify %s",BotPass);
- IRC_SendRaw(IRC_EchoConnection[1], msg);
- IRC_JoinChannel(IRC_EchoConnection[1], EchoChan);
- IRC_JoinChannel(IRC_EchoConnection[1], EchoChan2);
- }
- else if(botid == IRC_EchoConnection[2])
- {
- print("[IRC] Socket 3 established");
- format(msg,sizeof(msg), "Privmsg Nickserv identify %s",BotPass);
- IRC_SendRaw(IRC_EchoConnection[2], msg);
- IRC_JoinChannel(IRC_EchoConnection[2], EchoChan);
- IRC_JoinChannel(IRC_EchoConnection[2], EchoChan2);
- }
- return 1;
- }
- public IRC_OnDisconnect(botid)
- {
- if(botid == IRC_EchoConnection[0])
- {
- IRC_RemoveFromGroup(IRC_Group,IRC_EchoConnection[0]);
- print("[IRC] Bot 1 disconnected, reconnecting in 5 seconds...");
- SetTimer("IALoad1",5000,0);
- }
- else if(botid == IRC_EchoConnection[1])
- {
- IRC_RemoveFromGroup(IRC_Group,IRC_EchoConnection[1]);
- print("[IRC] Bot 2 disconnected, reconnecting in 5 seconds...");
- SetTimer("IALoad2",5000,0);
- }
- else if(botid == IRC_EchoConnection[2])
- {
- IRC_RemoveFromGroup(IRC_Group,IRC_EchoConnection[2]);
- print("[IRC] Bot 3 disconnected, reconnecting in 5 seconds...");
- SetTimer("IALoad3",5000,0);
- }
- return 1;
- }
- public IRC_OnLeaveChannel(botid, channel[], message[])
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement