mIRC Homepage
Posted By: Grenadier Simple Auto-Join Script problem.. - 29/05/08 02:27 AM
Hey all,

I am new to using mIRC, I have been using free clients for a couple of months now (besIRC, HydraIRC) and would like to move onto a more popular client.

I am trying to grasp the mIRC scripting language, but can't find any decent resources on getting started.

I am trying to write a script which will save me having to type out all the channels I idle everytime I restart my client. I usually visit three servers, Quakenet, Rizon and the worldofspectrum.

Here is what I have so far:

Code:
on *:START:{
  

  server irc.rizon.dk
  server -m irc.quakenet.org
}
 on *:CONNECT:{

  if($network == Rizon)
  {
    join #care

  }
 
 if($network == QuakeNet)
 { 
   join #2on2.css 
 } 
}


The problem I am having is when I start my client, the channels I have specified I want to connect to in Rizon open up in Quakenet. Thus, the validation check on the network doesn't seem to be working correctly. Can anyone help me with this?






mIRC does not support next-line braces on if-statements.

Example:


if ($something == something)
{
; This will not work as expected
}



if ($something == something) {
; this will work properly
}


Other than that, everything appears correct.

-genius_at_work
Posted By: Grenadier Re: Simple Auto-Join Script rpoblem... - 29/05/08 02:51 AM
Hey, thanks for the quick reply. I am to used to a C++ syntax. Anywho, I modified the code:

Code:
on *:START:{
  server irc.rizon.dk
  server -m irc.quakenet.org
}
 
on *:CONNECT:{
  if($network == Rizon){
    join #care
  }
 
  if($network == QuakeNet){ 
   join #2on2.css 
  } 
}


But still, the problem persists. Instead of only joining #care on Rizon, and #2on2.css on Quakenet, it joins #care on both the two servers and doesn't join #2on2.css at all.

I am a legit customer and this is really getting to me, HydraIRC had a very simple implementation of this.
Sorry, I wasn't looking closely enough.

In mIRC, if statements must be separated from their conditions.


if ($something == something) {

vs

if($something == something) {



Also, I'd like to direct you to mIRC's Perform dialog.

Alt+o > +Connect > Options > Perform

It allows you to add actions to be performed upon connecting to certain/all networks without complex scripting.



-genius_at_work
Posted By: Grenadier Re: Simple Auto-Join Script rpoblem... - 29/05/08 06:35 PM
Originally Posted By: genius_at_work
Sorry, I wasn't looking closely enough.

In mIRC, if statements must be separated from their conditions.


if ($something == something) {

vs

if($something == something) {



Also, I'd like to direct you to mIRC's Perform dialog.

Alt+o > +Connect > Options > Perform

It allows you to add actions to be performed upon connecting to certain/all networks without complex scripting.



-genius_at_work


Hey,

I don't think the first suggestion actually aplies. When I moved the braket(s) away from there matching if statements, It gave me an error when I connected (not enough arguements).

However, the later suggestion works fine and I am using it now (Perform).

Discussing with a friend, he suggested this method:

Code:
on *:START:{
 s -m irc.rizon.dk -j #unknowncheats, #care, #d2, #agerage, #mpc, #k, #rapidshare, #lisa, #/b/, #mpc, #artificialaiming, #ecc, #game-deception, #xgx, #ddeath, #kozmok, #elitecoders, #hackerattack, #coding, #help.script, #mpc_aao, #mpcradio, #mpc_mu, #md5, #mp3spam, #Projectcafe, #cheat-project, #mp-hacks
}


Problem Solved. Thanks a lot Genuis_at_work wink
Posted By: Riamus2 Re: Simple Auto-Join Script rpoblem... - 30/05/08 12:11 AM
Yes, the first suggestion does apply. If you had errors, it was something else.
Posted By: state Re: Simple Auto-Join Script problem.. - 01/06/08 07:01 PM
Originally Posted By: Grenadier


Code:

 if($network == QuakeNet)





I thought it would be

Code:
  if (QuakeNet isin $network ) {


But i dont use mirc so.........
© mIRC Discussion Forums