This doesn't display a message for each alias found, but it's easy to modify it using the -k switch to specify an alias as the outfile. A cleaner method (avoids a temp @window) that also catches aliases in .ini files would be
Code:
alias count.alias {
  filter -ffg $qt($1) nul /^(?:n\d+=)?alias /i
  return $filtered
}
nul is a device name in Windows and any output there is lost.
The only case where this might not give the correct number is when users have something like this in their scripts:
Code:
alias blah1 {
alias blah2 return something
}
ie they don't indent their code properly themselves and they don't use the mIRC Editor to edit their scripts (the Editor indents lines when you click OK). In this case, /blah2 will be recognized as an alias (it may or may not be, depending on whether /blah1 was run; either way, it will be in another file, in Aliases). This is a rare enough case imo to be completely ignored though.

Edit: also, it won't work correctly with ini files that contain more than one type of sections. For that, /loadbuf -t and a hidden @window would be most convenient

Last edited by qwerty; 13/05/07 03:30 PM.