# $EPIC: numonchannel,v 1.3 2001/07/23 22:07:46 jnelson Exp $
Synopsis:
   $numonchannel(<channel>)

Technical:
   * If the <channel> argument is omitted the current window's current 
     channel is assumed.  THIS MAY NOT NECCESARILY BE THE CORRECT CHANNEL
     IN AN /ON!
   * If the <channel> argument is the literal asterisk, (``*''), then the
     current window's current channel is assumed.  THIS MAY NOT NECCESARILY
     BE THE CORRECT CHANNEL IN AN /ON!
   * This function returns the number of members of the given channel
     on the current server.  This value may not be available before the
     /ON CHANNEL_SYNC event is thrown.
   * If you are not on <channel> or if the client does not have sufficient
     information about <channel>, the return value is 0.
   * Please remember that if you use this in an /ON that if you ask for a 
     <channel> on another server, you will get a return value of 0!
   * This function will not work properly in your status bar.

Practical:
   I originally wrote this function so my bot could tell when there was
   nobody left on the channel.  If the bot was not opped and it was the 
   only member of a channel, I would have it part and rejoin the channel
   to get channel ops.  You could also use it to set a special mode when
   the user count reaches a certain level.  Some channels will set the 
   channel member limit to 10 over the current count, and increment or
   decrement the channel limit every so often.  This can be quite effective
   in protecting against tsunami bot attacks.

Returns:
   Returns the number of users on the given channel, or 0 for any error.

History:
   This function first appeared in "plus 9" (post-ircII, pre-EPIC)

See Also:
   onchannel(6)

