User Tools

Site Tools


numonchannel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

numonchannel [2006/08/29 16:08] (current)
Line 1: Line 1:
 +# $EPIC: numonchannel.txt,​v 1.3 2006/08/19 02:04:37 sthalik 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)
  
numonchannel.txt ยท Last modified: 2006/08/29 16:08 (external edit)