1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00
irssi/src/core/nickmatch-cache.h
Timo Sirainen 1bfa0e1ee3 Nickmatch cache. A couple of helper functions to check if channel nicks
belong to something. Used for checking nickmasks in highlighting and
ignores (well, ignore isn't done yet).


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1138 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-21 04:09:48 +00:00

27 lines
715 B
C

#ifndef __NICKMATCH_CACHE_H
#define __NICKMATCH_CACHE_H
typedef void (*NICKMATCH_REBUILD_FUNC) (GHashTable *list,
CHANNEL_REC *channel, NICK_REC *nick);
typedef struct {
GHashTable *nicks;
NICKMATCH_REBUILD_FUNC func;
} NICKMATCH_REC;
NICKMATCH_REC *nickmatch_init(NICKMATCH_REBUILD_FUNC func);
void nickmatch_deinit(NICKMATCH_REC *rec);
/* Calls rebuild function for all nicks in all channels.
This must be called soon after nickmatch_init(), before any nicklist
signals get sent. */
void nickmatch_rebuild(NICKMATCH_REC *rec);
#define nickmatch_find(rec, nick) \
g_hash_table_lookup((rec)->nicks, nick)
void nickmatch_cache_init(void);
void nickmatch_cache_deinit(void);
#endif