that snippet will let u know the number of users on every channel ur on....works so easily with an alias /masscount...
watch it works :) note:dont write /masscount while ur not on channels
alias masscount {
if ($chan($me) != 0) {
var %channel.numbers $chan(me)
var %temp 0
:process
if (%temp < %channel.numbers) {
inc %temp 1
Echo -a 12(!)--> 2[4 $+ $chan(%temp) $+ 2]4 4Has A Record Of 2[4 $+ ! $+ $nick($chan(%temp),0) $+ ! $+ 2]4 4Users.
goto process
}
else { halt }
}
else { echo -a (!) Your Not On Any Channels !! }
}
Yikes that url didn\'t get formatted.
Btw you should loop through $comchan($me,%i) instead of $chan, because $chan makes no distinction between channels that you are in, and channels you are not in. When you disconnect from IRC, and have the optoin \"keep channels open\", and you reconnect, without rejoining those chans, those channel windows stay open and $chan includes those.
$comchan($me,N) only takes into account actual online channels.
The reason why you get errors when not using the correct syntax is explained here
although, I didnt include an error. but, that can just use an
else echo -a You arent on any channels. at the end, like you have.
also... when using the var command, its good practice to use
var = %var
there are some cases (I\'ve run into them, but cant remember the exact cases) where not using the = will produce unexpected results.
this isnt a channel peak of any sort. it lets you know how many people are currently on the chan. and what kutsum means. is the code looks cleaner with a while loop. For example.
alias chanusers {
if ($chan(0)) {
var %x = 1,%z = $v1
while (%x <= %z) {
echo -a $chan(%x) has a user cout of $nick($chan(%x),0)
inc %x
}
}
}
shorter, and cleaner looking. No offense. Just a tip. Comments are all about teaching people cleaner/ more efficient ways to do things.