diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-07 18:12:45 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-07 18:12:45 +0000 |
commit | f2c5ec55f306657b2eb249ae483270bc466c2cb7 (patch) | |
tree | 402c7aa6b7880424e98197efd09fbe559270bcba /include | |
parent | 632ca0fd6a2cfa3d06f87b77ccffcc2e5a835572 (diff) |
Added Server::CountUsers function
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@423 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 1 | ||||
-rw-r--r-- | include/modules.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index f38ee47be..442211ea1 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -111,4 +111,5 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key); chanrec* del_channel(userrec *user, const char* cname, const char* reason); void force_nickchange(userrec* user,const char* newnick); void kill_link(userrec *user,const char* r); +int usercount(chanrec *c); diff --git a/include/modules.h b/include/modules.h index 9b6bd0bd8..c7fd780bd 100644 --- a/include/modules.h +++ b/include/modules.h @@ -318,6 +318,10 @@ class Server : public classbase * Nicks for unregistered connections will return false. */ virtual bool IsNick(std::string nick); + /** Returns a count of the number of users on a channel. + * This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel. + */ + virtual int CountUsers(chanrec* c); /** Attempts to look up a nick and return a pointer to it. * This function will return NULL if the nick does not exist. */ |