mIRC Home    About    Download    Register    News    Help

Print Thread
#132702 13/10/05 05:18 PM
Joined: Oct 2005
Posts: 5
I
iowa666 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Oct 2005
Posts: 5
how do i make a server specific on connect event?

#132703 13/10/05 05:22 PM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
I always forget how many equal signs to use, but I think it would be

Code:

on *:CONNECT: {
  if ($server == yourserver) { do stuff here }
}

Last edited by bwr30060; 13/10/05 05:24 PM.
#132704 13/10/05 05:24 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
/Help on connect thats one of the most common scripts

anyhoo ex:.

Code:

on 1:CONNECT: {
if $server == irc.server1.com { 
join #ilovescripting
}
}



Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#132705 13/10/05 05:24 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
For a server specific on connect event:

Code:
on *:connect:{
  if ($server == irc.dal.net) { 
    ; code
  }
  elseif ($server == irc.rizon.net) {
    ; code
  }
}


Note that you can use wildcards like: if (*dal* iswm $server) { .. }

Also note that when you connect to a network, say DALnet, the server might vary, so doing a check with $network might be better, like:

Code:
on *:connect:{
  if ($network == dalnet) {
    ; code
  }
  elseif ($network == rizon) {
    ; code
  }
}


Gone.
#132706 20/10/05 05:30 PM
Joined: Oct 2005
Posts: 10
C
Pikka bird
Offline
Pikka bird
C
Joined: Oct 2005
Posts: 10
on connect event is wrong...! timer not use |

use by raw 3-4-5
Code:
  raw 3:*: {
if ($server isin $read(server.txt, w, $server )) {
.join  #youchan,chan2
timer $+ $server 1 20 $lag($server)...... and more 
}
if ($server = hub.yourserver.net.TR) {
join -n #tr 
}
}


:tongue: good luck

Last edited by CoCoRiC0; 20/10/05 05:32 PM.

Link Copied to Clipboard