mIRC Home    About    Download    Register    News    Help

Print Thread
#12731 23/02/03 08:03 PM
Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
ok..i made a script to join several servers and channels when I open mirc.
It works except that it tries to do all the commands at once..and I can't connect to the server fast enough.

so i need a timer that does something like this

/timer x x x /join #channel

please help, i know i didnt describe what i need real good, but that's the only way i can think of

#12732 23/02/03 08:25 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
You need to use both on START and on CONNECT events. The first one will connect to the servers, and the last one will join channels.
Code:

On *:start:{
  ;
  ; This event fires when you open mIRC.
  ;
  server irc.dal.net
  server -m irc.undernet.org
  server -m irc.efnet.org
}
  
On *:connect:{
  ;
  ; This event fires when you've successfully connected
  ; to a server.
  ;
  if $network == DALnet { join #chan1,#chan2,#chan3... }
  if $network == Undernet { join #chan1 }
  if $network == EFnet { join #chan1,#chan2 }
}  

Last edited by Hammer; 24/02/03 03:25 AM.
#12733 23/02/03 08:27 PM
Joined: Dec 2002
Posts: 204
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
Code:
;
;connect to several servers
;
on *:start:{
  .timer 1 0 server firstserver
  .timer 1 3 join #firstchannel 
  .timer 1 6 join #secondchannel
}

or you can use an ON CONNECT event
Code:
;
;on connect script
;
on *:CONNECT:{
  if ( $server == server.you.connect.to ) { join #chan1,#chan2,#chan3 }
  elseif ( $server == OTHER.server.you.connect.to ) { join #otherchan1,#otherchan2,#otherchan3 }
  else halt
}

Please bear in mind that this is just rough code and some one can probably clean it up quite a lot, i just didnt have the patience to make a beutifull scritpt smile



keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
#12734 23/02/03 08:52 PM
Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
Code:
 on 1:START:{ 
  /server ser.ver.net
  /server ser.ver.com
} 
on 1:CONNECT:{ 
  if (.ver.net isin $server) { 
    /join #channel
    /f2
    /id 
    /ignore -r
  if (.ver.com isin $server) {
    /join #channel
    /f2
    /id 
    /ignore -r
 }
 


that is what i have, or thats an example. the problem is that it tries to join the channel before the server is connected,

#12735 24/02/03 03:39 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
/help on START
/help on CONNECT
/help /server
Code:

on *:START:{
  server ser.ver.net -j #channel1,#channel2,#channel3
  server -m ser.ver.com -j #mIRC,#Help,#channel4
  server -m EFnet -i UmpaLumpa WillyW` -j #ChocolateFactory
  server -m QuakeNet -i OompaLoompa WillyWonka willy@wonka.com Everlasting Gobstoppers -j #ChocolateFactory
}
on *:CONNECT:{
  if ($network == VerNet) || ($network == VerCom) {
    F2
    id
    .ignore -r
  }
}

This event will automatically connect you to 4 networks when you first start mIRC. It will join #channel1, #channel2 and #channel3 on the first network connection you create (ser.ver.net) after it connects.

When you get connected on the second connection (ser.ver.com), it will join #mIRC, #Help and #channel4 on that network. Also, when those two networks get connected, the on CONNECT event will fire and perform the commands listed under their if condition.

When you are connecting to EFnet on the third connection, it will try to use UmpaLumpa as your primary nick on EFnet and WillyW` as your alternate nick; once connected it will automagically join #ChocolateFactory.

Finally, when you are connecting to QuakeNet, you'll be using OompaLoompa and WillyWonka as your primary and alternate nicks, willy@wonka.com as your emailaddr for that connection and Everlasting Gobstoppers as your Full Name for that connection. Once connected using either of those two nicks (or giving you the /nick command if both are in use), it will join #ChocolateFactory.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard