As I read this I am reminded of an old script I made using the built-in mIRC variable $comchan - pasted a long time ago - http://pastebin.com/dNQjvM4g
menu nicklist {
Common channels $1: /comchans $1
}
alias comchans {
var %n $comchan($1,0)
var %i 0
var %t %n common channels for $1 $+ :
while (%i < %n) {
inc %i 1
var %t %t $comchan($1,%i)
}
echo -a %t
}
More primitive output directly in the channel but it has served me well showing a single user at the time.
Scanning all users could be useful - sometimes.
Thanks for pointing out $comchan. Never seen it before. I wonder if it spans multiple servers too like my version of it.