2000-04-26 04:03:38 -04:00
|
|
|
#ifndef __NICKLIST_H
|
|
|
|
#define __NICKLIST_H
|
|
|
|
|
2000-12-05 20:07:21 -05:00
|
|
|
/* Returns NICK_REC if it's nick, NULL if it isn't. */
|
|
|
|
#define NICK(server) \
|
|
|
|
MODULE_CHECK_CAST(server, NICK_REC, type, "NICK")
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2000-12-05 20:07:21 -05:00
|
|
|
#define IS_NICK(server) \
|
|
|
|
(NICK(server) ? TRUE : FALSE)
|
2000-08-26 11:39:44 -04:00
|
|
|
|
2001-01-01 02:45:54 -05:00
|
|
|
struct _NICK_REC {
|
2000-12-05 20:07:21 -05:00
|
|
|
#include "nick-rec.h"
|
2001-01-01 02:45:54 -05:00
|
|
|
};
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
/* Add new nick to list */
|
2001-02-02 17:10:20 -05:00
|
|
|
void nicklist_insert(CHANNEL_REC *channel, NICK_REC *nick);
|
2001-01-20 19:49:52 -05:00
|
|
|
/* Set host address for nick */
|
|
|
|
void nicklist_set_host(CHANNEL_REC *channel, NICK_REC *nick, const char *host);
|
2001-01-14 13:30:02 -05:00
|
|
|
/* Remove nick from list */
|
2000-04-26 04:03:38 -04:00
|
|
|
void nicklist_remove(CHANNEL_REC *channel, NICK_REC *nick);
|
2001-01-14 13:30:02 -05:00
|
|
|
/* Change nick */
|
|
|
|
void nicklist_rename(SERVER_REC *server, const char *old_nick,
|
|
|
|
const char *new_nick);
|
2001-03-04 05:30:41 -05:00
|
|
|
void nicklist_rename_unique(SERVER_REC *server,
|
|
|
|
void *old_nick_id, const char *old_nick,
|
|
|
|
void *new_nick_id, const char *new_nick);
|
2001-01-14 13:30:02 -05:00
|
|
|
|
2001-01-27 20:45:31 -05:00
|
|
|
/* Find nick */
|
|
|
|
NICK_REC *nicklist_find(CHANNEL_REC *channel, const char *nick);
|
2001-02-17 16:46:35 -05:00
|
|
|
NICK_REC *nicklist_find_unique(CHANNEL_REC *channel, const char *nick,
|
|
|
|
void *id);
|
2001-01-27 20:45:31 -05:00
|
|
|
/* Find nick mask, wildcards allowed */
|
|
|
|
NICK_REC *nicklist_find_mask(CHANNEL_REC *channel, const char *mask);
|
2000-05-04 06:32:42 -04:00
|
|
|
/* Get list of nicks that match the mask */
|
|
|
|
GSList *nicklist_find_multiple(CHANNEL_REC *channel, const char *mask);
|
2000-04-26 04:03:38 -04:00
|
|
|
/* Get list of nicks */
|
|
|
|
GSList *nicklist_getnicks(CHANNEL_REC *channel);
|
|
|
|
/* Get all the nick records of `nick'. Returns channel, nick, channel, ... */
|
2000-08-26 11:39:44 -04:00
|
|
|
GSList *nicklist_get_same(SERVER_REC *server, const char *nick);
|
2001-02-17 16:46:35 -05:00
|
|
|
GSList *nicklist_get_same_unique(SERVER_REC *server, void *id);
|
2000-08-26 11:39:44 -04:00
|
|
|
|
|
|
|
/* Update specified nick's status in server. */
|
|
|
|
void nicklist_update_flags(SERVER_REC *server, const char *nick,
|
|
|
|
int gone, int ircop);
|
2001-02-17 16:46:35 -05:00
|
|
|
void nicklist_update_flags_unique(SERVER_REC *server, void *id,
|
|
|
|
int gone, int ircop);
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2001-02-18 17:46:25 -05:00
|
|
|
/* Specify which nick in channel is ours */
|
|
|
|
void nicklist_set_own(CHANNEL_REC *channel, NICK_REC *nick);
|
|
|
|
|
2000-06-04 08:38:28 -04:00
|
|
|
/* Nick record comparision for sort functions */
|
2000-04-26 04:03:38 -04:00
|
|
|
int nicklist_compare(NICK_REC *p1, NICK_REC *p2);
|
|
|
|
|
2000-09-30 18:49:48 -04:00
|
|
|
/* Check is `msg' is meant for `nick'. */
|
2000-12-16 20:20:21 -05:00
|
|
|
int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick);
|
2000-09-30 18:49:48 -04:00
|
|
|
|
2000-04-26 04:03:38 -04:00
|
|
|
void nicklist_init(void);
|
|
|
|
void nicklist_deinit(void);
|
|
|
|
|
|
|
|
#endif
|