Countusers Alias

By rolz14 on May 31, 2005

Add it to ur aliases and type /cusers on a channel

/cusers {
  set %i 0
  :next
  set %nick $nick(#,%i)
  if %nick == $null goto done
  inc %i
  goto next
  :done
  msg $chan 10 $+ There is Currently $calc(%i - 1) users on the channel!
}

Comments

Sign in to comment.
QuickStep   -  May 31, 2005

like yoinx said:
alias cusers msg # There are currently $nick(#,0) users on #

 Respond  
PoiXon   -  May 31, 2005

yoinx yes it is, but if u type the alias in a channel window it will message that channel

 Respond  
Yoinx   -  May 31, 2005

and btw, $chan is $null in an alias.

 Respond  
Yoinx   -  May 31, 2005

ya know, $nick(#,0) , would do the same thing.

 Respond  
DarthReven   -  May 31, 2005

unless you wanted to do percent of users an alias like this is useless but for a starting alias its fuctional though not interly acurate because you are included in the $nick(#,%i) count and the this type of script is better suited for a while loop

 Respond  
PoiXon   -  May 31, 2005

yeh, they arent needed i think they got the idea from that listops thing in the help file and just played around with it.

rolz14 , you could use a loop like this

alias cusers {
var %i = 0
while ($nick(#,%i) != $null) {
inc %i
if ($nick(#,%i) == $null) {
msg $chan 10 $+ There is Currently $calc(%i - 1) users on the channel!
}
}
}

 Respond  
xDaeMoN   -  May 31, 2005

variables are not needed since you are just counting the number of users in the channel. alias cusers { if ($chan) msg $chan There is $nick(#,0) users in this Channel. }

 Respond  
rolz14   -  May 31, 2005

heh its pretty useless but thought someone might want it

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.