2019-05-01 16:22:22 -04:00
|
|
|
#ifndef IRSSI_CORE_CHANNELS_SETUP_H
|
|
|
|
#define IRSSI_CORE_CHANNELS_SETUP_H
|
2000-08-26 11:39:44 -04:00
|
|
|
|
2019-05-01 10:33:47 -04:00
|
|
|
#include <irssi/src/core/modules.h>
|
2000-08-26 11:39:44 -04:00
|
|
|
|
2001-02-17 14:44:22 -05:00
|
|
|
#define CHANNEL_SETUP(server) \
|
|
|
|
MODULE_CHECK_CAST(server, CHANNEL_SETUP_REC, type, "CHANNEL SETUP")
|
2000-08-26 11:39:44 -04:00
|
|
|
|
2001-02-17 14:44:22 -05:00
|
|
|
#define IS_CHANNEL_SETUP(server) \
|
|
|
|
(CHANNEL_SETUP(server) ? TRUE : FALSE)
|
2000-08-26 11:39:44 -04:00
|
|
|
|
2001-02-17 14:44:22 -05:00
|
|
|
struct _CHANNEL_SETUP_REC {
|
2019-05-01 10:33:47 -04:00
|
|
|
#include <irssi/src/core/channel-setup-rec.h>
|
2001-01-01 02:45:54 -05:00
|
|
|
};
|
2000-08-26 11:39:44 -04:00
|
|
|
|
|
|
|
extern GSList *setupchannels;
|
|
|
|
|
|
|
|
void channels_setup_init(void);
|
|
|
|
void channels_setup_deinit(void);
|
|
|
|
|
2001-02-17 14:44:22 -05:00
|
|
|
void channel_setup_create(CHANNEL_SETUP_REC *channel);
|
|
|
|
void channel_setup_remove(CHANNEL_SETUP_REC *channel);
|
2000-08-26 11:39:44 -04:00
|
|
|
|
2015-10-01 16:36:02 -04:00
|
|
|
/* Remove channels attached to chatnet */
|
|
|
|
void channel_setup_remove_chatnet(const char *chatnet);
|
|
|
|
|
2001-02-17 14:44:22 -05:00
|
|
|
CHANNEL_SETUP_REC *channel_setup_find(const char *channel,
|
|
|
|
const char *chatnet);
|
2000-08-26 11:39:44 -04:00
|
|
|
|
|
|
|
#define channel_chatnet_match(rec, chatnet) \
|
|
|
|
((rec) == NULL || (rec)[0] == '\0' || \
|
2014-06-10 12:06:19 -04:00
|
|
|
((chatnet) != NULL && g_ascii_strcasecmp(rec, chatnet) == 0))
|
2000-08-26 11:39:44 -04:00
|
|
|
|
|
|
|
#endif
|