mIRC Homepage
Posted By: Topham [Help Needed] on *:CONNECT: - 23/08/07 09:48 PM
Hello im trying to get a command to work so that when i connect to a server i message something and join channels at the same time.

This is the code im using:-

on 1:CONNECT:{/msg Q@CServe.quakenet.org AUTH Topham *********
/join #csmanager}

and its in remote tab
Posted By: deegee Re: [Help Needed] on *:CONNECT: - 23/08/07 10:02 PM
Spacing is important, commands etc cannot be up against braces/brackets

Code:
on *:CONNECT:{
  msg Q@CServe.quakenet.org AUTH Topham *********
  join #csmanager 
}


You might want to check $netwrk too, to save performing those commands if you connect to a different network

Code:
on *:CONNECT:{
  if $network == quakenet { 
    msg Q@CServe.quakenet.org AUTH Topham *********
    join #csmanager 
  } 
}
Posted By: sparta Re: [Help Needed] on *:CONNECT: - 23/08/07 10:03 PM
Originally Posted By: Topham

on 1:CONNECT:{/msg Q@CServe.quakenet.org AUTH Topham *********
/join #csmanager}

Code:
on 1:CONNECT:{ /msg Q@CServe.quakenet.org AUTH Topham *********
/join #csmanager }

don't forget space between { and }
Posted By: Topham Re: [Help Needed] on *:CONNECT: - 02/09/07 01:15 AM
deegee that code doesnt work m8 can u say why?
Posted By: doglem Re: [Help Needed] on *:CONNECT: - 02/09/07 03:33 AM
By what I'm seeing it should work.. the only reason i can think of why it doesnt work is either ur remotes are off... or you have another ON Connect in the same remote file...

ie: if you have...

on *:connect:{ echo -a blah }
on *:connect:{ echo -a blah1 }

you will only echo "blah" when you connect because mirc just reads to the first connect script.. it dont "see" the second one.. or any thereafter the first.
Posted By: noMen Re: [Help Needed] on *:CONNECT: - 02/09/07 07:29 AM
To my experience the $network identifier does not always return a value. I don't know why but it looks to be depending on the way you connect to a server. Try this:

Code:
on *:CONNECT: {
  if $network == quakenet { 
    msg Q@CServe.quakenet.org AUTH Topham *********
    join #csmanager 
  } 
  else {
    echo -a just for testing: $network
  }
}


This can help you (and us) finding the cause of your problem.
Posted By: Topham Re: [Help Needed] on *:CONNECT: - 03/09/07 08:43 AM
i use 2 netword quakenet and freenode how will i set up for the 2 different network?
Posted By: SplitFire Re: [Help Needed] on *:CONNECT: - 03/09/07 12:08 PM
Code:
on *:CONNECT: {
  if ($network == quakenet) { 
    msg Q@CServe.quakenet.org AUTH Topham *********
    join #csmanager 
  } 
  elseif ($network == freenode) {
    msg service.name.here AUTH Topham *********
    join #channelname
  }
 else { halt }
}

© mIRC Discussion Forums