Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.75 KB | None | 0 0
  1. public IRC_OnConnect(botid)
  2. {
  3.  
  4.     new msg[512];
  5.     if(botid == IRC_EchoConnection[0])
  6.     {
  7.         print("[IRC] Socket 1 established");
  8.         format(msg,sizeof(msg), "Privmsg Nickserv identify %s",BotPass);
  9.         IRC_SendRaw(IRC_EchoConnection[0], msg);
  10.         IRC_JoinChannel(IRC_EchoConnection[0], EchoChan);
  11.         IRC_JoinChannel(IRC_EchoConnection[0], EchoChan2);
  12.     }
  13.     else if(botid == IRC_EchoConnection[1])
  14.     {
  15.         print("[IRC] Socket 2 established");
  16.         format(msg,sizeof(msg), "Privmsg Nickserv identify %s",BotPass);
  17.         IRC_SendRaw(IRC_EchoConnection[1], msg);
  18.         IRC_JoinChannel(IRC_EchoConnection[1], EchoChan);
  19.         IRC_JoinChannel(IRC_EchoConnection[1], EchoChan2);
  20.     }
  21.         else if(botid == IRC_EchoConnection[2])
  22.     {
  23.         print("[IRC] Socket 3 established");
  24.         format(msg,sizeof(msg), "Privmsg Nickserv identify %s",BotPass);
  25.         IRC_SendRaw(IRC_EchoConnection[2], msg);
  26.         IRC_JoinChannel(IRC_EchoConnection[2], EchoChan);
  27.         IRC_JoinChannel(IRC_EchoConnection[2], EchoChan2);
  28.     }
  29.     return 1;
  30. }
  31.  
  32.  
  33. public IRC_OnDisconnect(botid)
  34. {
  35.     if(botid == IRC_EchoConnection[0])
  36.     {
  37.         IRC_RemoveFromGroup(IRC_Group,IRC_EchoConnection[0]);
  38.         print("[IRC] Bot 1 disconnected, reconnecting in 5 seconds...");
  39.         SetTimer("IALoad1",5000,0);
  40.     }
  41.     else if(botid == IRC_EchoConnection[1])
  42.     {
  43.         IRC_RemoveFromGroup(IRC_Group,IRC_EchoConnection[1]);
  44.         print("[IRC] Bot 2 disconnected, reconnecting in 5 seconds...");
  45.         SetTimer("IALoad2",5000,0);
  46.     }
  47.         else if(botid == IRC_EchoConnection[2])
  48.     {
  49.         IRC_RemoveFromGroup(IRC_Group,IRC_EchoConnection[2]);
  50.         print("[IRC] Bot 3 disconnected, reconnecting in 5 seconds...");
  51.         SetTimer("IALoad3",5000,0);
  52.     }
  53.     return 1;
  54. }
  55. public IRC_OnLeaveChannel(botid, channel[], message[])
  56. {
  57. return 1;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement