4 /* Returns NICK_REC if it's nick, NULL if it isn't. */
6 MODULE_CHECK_CAST(server, NICK_REC, type, "NICK")
8 #define IS_NICK(server) \
9 (NICK(server) ? TRUE : FALSE)
15 /* Add new nick to list */
16 void nicklist_insert(CHANNEL_REC *channel, NICK_REC *nick);
17 /* Set host address for nick */
18 void nicklist_set_host(CHANNEL_REC *channel, NICK_REC *nick, const char *host);
19 /* Remove nick from list */
20 void nicklist_remove(CHANNEL_REC *channel, NICK_REC *nick);
22 void nicklist_rename(SERVER_REC *server, const char *old_nick,
23 const char *new_nick);
24 void nicklist_rename_unique(SERVER_REC *server,
25 void *old_nick_id, const char *old_nick,
26 void *new_nick_id, const char *new_nick);
29 NICK_REC *nicklist_find(CHANNEL_REC *channel, const char *nick);
30 NICK_REC *nicklist_find_unique(CHANNEL_REC *channel, const char *nick,
32 /* Find nick mask, wildcards allowed */
33 NICK_REC *nicklist_find_mask(CHANNEL_REC *channel, const char *mask);
34 /* Get list of nicks that match the mask */
35 GSList *nicklist_find_multiple(CHANNEL_REC *channel, const char *mask);
36 /* Get list of nicks */
37 GSList *nicklist_getnicks(CHANNEL_REC *channel);
38 /* Get all the nick records of `nick'. Returns channel, nick, channel, ... */
39 GSList *nicklist_get_same(SERVER_REC *server, const char *nick);
40 GSList *nicklist_get_same_unique(SERVER_REC *server, void *id);
42 /* Update specified nick's status in server. */
43 void nicklist_update_flags(SERVER_REC *server, const char *nick,
45 void nicklist_update_flags_unique(SERVER_REC *server, void *id,
48 /* Specify which nick in channel is ours */
49 void nicklist_set_own(CHANNEL_REC *channel, NICK_REC *nick);
51 /* Nick record comparision for sort functions */
52 int nicklist_compare(NICK_REC *p1, NICK_REC *p2);
54 /* Check is `msg' is meant for `nick'. */
55 int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick);
57 void nicklist_init(void);
58 void nicklist_deinit(void);