mIRC Homepage
Posted By: TECO identifier $mask - 11/06/20 09:04 PM
Hi,

Someone can help me? I don't understand why it doesn't return type 0. It just returns me from 1-9 and ignores the type 0 ban

Code
alias mask.sub {
  if ($1 isnum 0-9) { return $iif($1 == % [ $+ [ $2 ] $+ ] .mask,$style(1)) $+(&,$1,. $mask($iif($3,$3,nick!ident@some.host.com),$1),:chg,$2,mask) $1 }
}

Example:
[Linked Image from i.ibb.co]
Posted By: maroon Re: identifier $mask - 12/06/20 04:19 AM
You didn't include how the alias was being called, but i assume from the context that you're calling it from $submenu
/help $submenu shows that the first integer called by $submenu is 1 not 0, so if you're needing to have results for 0-9, you need to get that from 1-10, like doing something like:

alias mask.sub {
if ($1 isnum 1-10) {
tokenize 32 $calc($1 -1) $2-
return $iif($1 == % [ $+ [ $2 ] $+ ] .mask,$style(1)) $+(&,$1,. $mask($iif($3,$3,nick!ident@some.host.com),$1),:chg,$2,mask) $1 }
}
Posted By: TECO Re: identifier $mask - 12/06/20 09:37 AM
Hi maroon,
Yes, I am using $submenu. But my problem solved your help.

[Linked Image from i.ibb.co]

Thank you wink
© mIRC Discussion Forums