mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2008
Posts: 3
G
Self-satisified door
OP Offline
Self-satisified door
G
Joined: May 2008
Posts: 3
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?







Last edited by Grenadier; 29/05/08 02:52 AM.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Joined: May 2008
Posts: 3
G
Self-satisified door
OP Offline
Self-satisified door
G
Joined: May 2008
Posts: 3
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.

Last edited by Grenadier; 29/05/08 02:51 AM.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Last edited by genius_at_work; 29/05/08 02:59 AM.
Joined: May 2008
Posts: 3
G
Self-satisified door
OP Offline
Self-satisified door
G
Joined: May 2008
Posts: 3
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

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, the first suggestion does apply. If you had errors, it was something else.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2004
Posts: 133
S
Vogon poet
Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
Originally Posted By: Grenadier


Code:

 if($network == QuakeNet)





I thought it would be

Code:
  if (QuakeNet isin $network ) {


But i dont use mirc so.........

Last edited by state; 01/06/08 07:01 PM.

Link Copied to Clipboard