mIRC Home    About    Download    Register    News    Help

Topic Options
#251112 - 09/02/15 09:03 PM compatible code mIRC6.2
JuanAm Offline
Vogon poet

Registered: 12/11/14
Posts: 149
I use mIRC 7.32.
Write a few lines of code for a friend who use mIRC 6.2 (and he do not want to update).
There is a line that is not interpreted well, gives no error, but the comparison not runs.

Is the No. 4 line, this code ($iif):

Code:
if ($1 == kb) { 
    mode $chan +b $address($2,2)
    mode $chan +b $2 
    $iif($remtok($gettok($address($2,0),1,64),*,0,33) != ircap,mode $chan +b $remtok($gettok($address($2,0),1,64),*,0,33))  
    kick $chan $2 $3-
  }

Any idea why it does not work?

P.D
That line compares the IDENT user, whether it is 'ircap' no bans the ident, if different to 'ircap' if the bans.


Edited by JuanAm (09/02/15 09:10 PM)
Edit Reason: more data

Top
#251126 - 10/02/15 09:45 AM Re: compatible code mIRC6.2 [Re: JuanAm]
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2541
The $iif is poor form. While I don't see a glaring problem with the syntax (i'm not looking that hard), I can tell you that you SHOULD be using a regular if-condition in this case.

if (condition) { /behavior }

not

$iif(condition,/behavior)

Perhaps if you switch to a proper if, the problem will work itself out.
_________________________
At least I won lunch.
Good philosophy, see good in bad, I like!

Top
#251137 - 10/02/15 06:12 PM Re: compatible code mIRC6.2 [Re: Raccoon]
JuanAm Offline
Vogon poet

Registered: 12/11/14
Posts: 149
Originally Posted By: Raccoon
The $iif is poor form. While I don't see a glaring problem with the syntax (i'm not looking that hard), I can tell you that you SHOULD be using a regular if-condition in this case.

if (condition) { /behavior }

not

$iif(condition,/behavior)

Perhaps if you switch to a proper if, the problem will work itself out.


Thanks Raccoon
I use mIRC 7.32 and it works $iff, now replaced it, for regular if-condition, also works for me.

I'll pass the code to my friend to try it with your mIRC 6.2.

Very friendly smile

Top
#251155 - 11/02/15 02:15 AM Re: compatible code mIRC6.2 [Re: JuanAm]
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2541
And as always, you should not use anything older than mIRC v6.35, which addresses a number of security concerns from earlier versions like v6.2. Tell your friend to upgrade.
_________________________
At least I won lunch.
Good philosophy, see good in bad, I like!

Top