mIRC Homepage
Posted By: xBRUCEYx Multiple server join script - 05/12/22 04:04 AM
Hello was wondering if someone could help with a auto join script that auto starts multiple servers and nickser identifies and bot joins with a site nick and password key this is what i have so far as an example

on *:CONNECT:{
if ( network) {
nickserv identify gorf
/msg dorks enter #blabla, #gong "user" "key"
}
on *:CONNECT:{
if (irc.bozonetwork.net) {
nickserv identify dumbarse
/msg amiels enter #whacked, #bozo-lounge "user" "key"
}
on *:CONNECT:{
if (irc.porchmonkey.org) {
nickserv identify snarf
/msg dogfluffer enter #joe, #blow "user" "key"
}


sorry guys im new its works on mirc if i start servers manually kinda, but would like servers to start and auto load after i start progam i had that all set up years ago but have since forgotten

any help would be appreciated
Posted By: MstrControl Re: Multiple server join script - 05/12/22 11:38 AM
Dear Bruce,

you're on the right track. I did something similar, but you only need one event.

If you want to auto connect to different servers, this is how I did:

Code
on 1:START: {
  /server first.server.net1
  /server -m second.server.net2
}

on 1:CONNECT: {
  if (*.net1 iswm $server) {
    if ($me == YourNick) {
      /nickserv identify YourNick YourPassword
    } else {
      /nickserv ghost YourNick YourPassword
    }
    /j #YourChannelOnNet1
  }

  if (*.net2 iswm $server) {
    if ($me == YourNick) {
      /nickserv identify YourNick YourPassword
    } else {
      /nickserv ghost YourNick YourPassword
    }
    /j #YourChannelOnNet2
  }

}
Posted By: Simo Re: Multiple server join script - 07/12/22 04:46 PM
try this :

Code

on *:start: {
  server irc.blach.com  -i YourNick YourAltNick  user@ gecosname
  server -m irc.blah2.org -i YourNick YourAltNick  user@ gecosname 
  server -m irc.blah3.org -i YourNick YourAltNick  user@ gecosname 
  server -m irc.blah4.org -i YourNick YourAltNick  user@ gecosname 
}

ON 1:Connect:{ 
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
  if ($istok(network1 network2 network3,$network,32)) { nick yournick | nickserv identify password-here }
}


on *:notice:*:?:{

 ; for undernet
  if ($regex($1-,/(.*VERIFICATIE.*SUCCESVOL.*)/Si) && $nick == X) {  if ($istok(UnderNet,$network,32)) { delayjoinxz 3 1 #ChatWorld,#pc-mirc-help } }
 
 ; for anope services
  if ($regex($1-,/(.*Password.*accepted.*|.*you.*identified.*)/Si) && $nick == nickserv) {   
    if ($istok(some-network,$network,32)) { delayjoinxz 3 1 #ChatWorld,#pc-mirc-help }   
  }

}




; /delayjoinxz <start-delay> <join-delay> #chan1 [pass][,#chan2 [pass],...]
; <start-delay> is the number of seconds to wait before joining channels
; <join-delay> is the number of seconds to wait between channel joins

delayjoinxz {
  if ($1 !isnum || $2 !isnum || (!$3)) { echo /delayjoin: invalid parameters }
  else {
    var %delay = $1
    var %x = 1
    while (%x <= $numtok($3,44)) {
      .timer 1 %delay join $!eval( $gettok($3,%x,44) ,0)
      inc %delay $2
      inc %x
    }
  }
}

Posted By: Simo Re: Multiple server join script - 08/12/22 11:44 AM
perhaps this is more accurate incase services is down and up again to ask you to identify for your nick

Code


on *:start: {
  server irc.blach.com  -i YourNick YourAltNick  user@ gecosname
  server -m irc.blah2.org -i YourNick YourAltNick  user@ gecosname 
  server -m irc.blah3.org -i YourNick YourAltNick  user@ gecosname 
  server -m irc.blah4.org -i YourNick YourAltNick  user@ gecosname 
}



on *:notice:*:?:{

  if ($regex($1-,/(.*This.*nickname.*is.*registered.*and.*protected.*If.*it.*is.*your.*)/Si) && $nick == nickserv) {   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
    if ($istok(network-here ,$network,32) && $me == yournick) { nickserv identify password-here }   
  }

 ; for undernet
  if ($regex($1-,/(.*VERIFICATIE.*SUCCESVOL.*)/Si) && $nick == X) {  if ($istok(UnderNet,$network,32)) { delayjoinxz 3 1 #channel1,#channel2 } }
 
 ; for anope services
  if ($regex($1-,/(.*Password.*accepted.*|.*you.*identified.*)/Si) && $nick == nickserv) {   
    if ($istok(some-network,$network,32)) { delayjoinxz 3 1 #channel1,#channel2 }   
  }

}




; /delayjoinxz <start-delay> <join-delay> #chan1 [pass][,#chan2 [pass],...]
; <start-delay> is the number of seconds to wait before joining channels
; <join-delay> is the number of seconds to wait between channel joins

delayjoinxz {
  if ($1 !isnum || $2 !isnum || (!$3)) { echo /delayjoin: invalid parameters }
  else {
    var %delay = $1
    var %x = 1
    while (%x <= $numtok($3,44)) {
      .timer 1 %delay join $!eval( $gettok($3,%x,44) ,0)
      inc %delay $2
      inc %x
    }
  }
}

Posted By: xBRUCEYx Re: Multiple server join script - 16/12/22 05:42 AM
Thanks alot guys !!
© mIRC Discussion Forums