mIRC Home    About    Download    Register    News    Help

Print Thread
#267354 11/06/20 09:04 PM
Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
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)
TECO #267356 12/06/20 04:19 AM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.
maroon #267357 12/06/20 09:37 AM
Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
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)

Link Copied to Clipboard