mIRC Home    About    Download    Register    News    Help

Print Thread
identifier $mask #267354 11/06/20 09:04 PM
Joined: Jul 2014
Posts: 182
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 182
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]


TECO
irc.PTirc.org (Co-Admin)
Re: identifier $mask [Re: TECO] #267356 12/06/20 04:19 AM
Joined: Jan 2004
Posts: 1,328
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,328
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 }
}

Last edited by maroon; 12/06/20 04:27 AM.
Re: identifier $mask [Re: maroon] #267357 12/06/20 09:37 AM
Joined: Jul 2014
Posts: 182
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 182
Hi maroon,
Yes, I am using $submenu. But my problem solved your help.

[Linked Image from i.ibb.co]

Thank you wink

Last edited by TECO; 12/06/20 10:19 AM.

TECO
irc.PTirc.org (Co-Admin)