# $EPIC: numonchannel.txt,v 1.3 2006/08/19 02:04:37 sthalik Exp $
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 the number of users on the given channel, or 0 for any error.
This function first appeared in “plus 9” (post-ircII, pre-EPIC)