X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fhash.h;h=e702e63bd29a7bb3c93dcb573aa24136c0deee21;hb=3d59398668e6f0977c147c5efeefe7582d05b25b;hp=79f882774fc5a96445cbc259f251bc98b2ef01d8;hpb=ae91ef6320f611af74e70a0db2620c338fbaa7d5;p=ircu2.10.12-pk.git diff --git a/include/hash.h b/include/hash.h index 79f8827..e702e63 100644 --- a/include/hash.h +++ b/include/hash.h @@ -15,8 +15,10 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * $Id$ + */ +/** @file + * @brief Hash table management APIs. + * @version $Id$ */ #ifndef INCLUDED_hash_h @@ -24,12 +26,15 @@ struct Client; struct Channel; +struct StatDesc; /* * general defines */ -/* Now client and channel hash table must be of the same size */ +/** Size of client and channel hash tables. + * Both must be of the same size. + */ #define HASHSIZE 32000 /* @@ -45,23 +50,31 @@ struct Channel; */ /* Raw calls, expect a core if you pass a NULL or zero-length name */ +/** Search for a channel by name. */ #define SeekChannel(name) hSeekChannel((name)) +/** Search for any client by name. */ #define SeekClient(name) hSeekClient((name), ~0) +/** Search for a registered user by name. */ #define SeekUser(name) hSeekClient((name), (STAT_USER)) +/** Search for a server by name. */ #define SeekServer(name) hSeekClient((name), (STAT_ME | STAT_SERVER)) /* Safer macros with sanity check on name, WARNING: these are _macros_, no side effects allowed on ! */ +/** Search for a channel by name. */ #define FindChannel(name) (BadPtr((name)) ? 0 : SeekChannel(name)) +/** Search for any client by name. */ #define FindClient(name) (BadPtr((name)) ? 0 : SeekClient(name)) +/** Search for a registered user by name. */ #define FindUser(name) (BadPtr((name)) ? 0 : SeekUser(name)) +/** Search for a server by name. */ #define FindServer(name) (BadPtr((name)) ? 0 : SeekServer(name)) /* * Proto types */ -extern void hash_init(void); /* Call me on startup */ +extern void init_hash(void); /* Call me on startup */ extern int hAddClient(struct Client *cptr); extern int hAddChannel(struct Channel *chptr); extern int hRemClient(struct Client *cptr); @@ -75,5 +88,8 @@ extern int m_hash(struct Client *cptr, struct Client *sptr, int parc, char *parv extern int isNickJuped(const char *nick); extern int addNickJupes(const char *nicks); extern void clearNickJupes(void); +extern void stats_nickjupes(struct Client* to, const struct StatDesc* sd, + char* param); +extern void list_next_channels(struct Client *cptr); #endif /* INCLUDED_hash_h */