1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00
irssi/src/core/nicklist.h
Timo Sirainen 6e19541f46 Improved nick_match_msg() - it shouldn't give wrong matches as easily
anymore. Also supports multiple targets in one line (nick1,nick2: hello)


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@996 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-12-17 01:20:21 +00:00

46 lines
1.4 KiB
C

#ifndef __NICKLIST_H
#define __NICKLIST_H
#include "servers.h"
#include "channels.h"
/* Returns NICK_REC if it's nick, NULL if it isn't. */
#define NICK(server) \
MODULE_CHECK_CAST(server, NICK_REC, type, "NICK")
#define IS_NICK(server) \
(NICK(server) ? TRUE : FALSE)
typedef struct {
#include "nick-rec.h"
} NICK_REC;
/* Add new nick to list */
NICK_REC *nicklist_insert(CHANNEL_REC *channel, const char *nick,
int op, int voice, int send_massjoin);
/* remove nick from list */
void nicklist_remove(CHANNEL_REC *channel, NICK_REC *nick);
/* Find nick record from list */
NICK_REC *nicklist_find(CHANNEL_REC *channel, const char *mask);
/* Get list of nicks that match the mask */
GSList *nicklist_find_multiple(CHANNEL_REC *channel, const char *mask);
/* Get list of nicks */
GSList *nicklist_getnicks(CHANNEL_REC *channel);
/* Get all the nick records of `nick'. Returns channel, nick, channel, ... */
GSList *nicklist_get_same(SERVER_REC *server, const char *nick);
/* Update specified nick's status in server. */
void nicklist_update_flags(SERVER_REC *server, const char *nick,
int gone, int ircop);
/* Nick record comparision for sort functions */
int nicklist_compare(NICK_REC *p1, NICK_REC *p2);
/* Check is `msg' is meant for `nick'. */
int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick);
void nicklist_init(void);
void nicklist_deinit(void);
#endif