mIRC Homepage
Posted By: JuanAm compatible code mIRC6.2 - 09/02/15 09:03 PM
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.
Posted By: Raccoon Re: compatible code mIRC6.2 - 10/02/15 09:45 AM
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.
Posted By: JuanAm Re: compatible code mIRC6.2 - 10/02/15 06:12 PM
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
Posted By: Raccoon Re: compatible code mIRC6.2 - 11/02/15 02:15 AM
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.
© mIRC Discussion Forums