mIRC Home    About    Download    Register    News    Help

Print Thread
compatible code mIRC6.2 #251112 09/02/15 09:03 PM
Joined: Nov 2014
Posts: 149
J
JuanAm Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: Nov 2014
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.

Last edited by JuanAm; 09/02/15 09:10 PM. Reason: more data
Re: compatible code mIRC6.2 [Re: JuanAm] #251126 10/02/15 09:45 AM
Joined: Feb 2003
Posts: 2,642
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,642
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.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: compatible code mIRC6.2 [Re: Raccoon] #251137 10/02/15 06:12 PM
Joined: Nov 2014
Posts: 149
J
JuanAm Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: Nov 2014
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

Re: compatible code mIRC6.2 [Re: JuanAm] #251155 11/02/15 02:15 AM
Joined: Feb 2003
Posts: 2,642
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,642
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.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!