1 #ifndef __CHANNELS_SETUP_H
2 #define __CHANNELS_SETUP_H
3 
4 #include "modules.h"
5 
6 #define CHANNEL_SETUP(server) \
7 	MODULE_CHECK_CAST(server, CHANNEL_SETUP_REC, type, "CHANNEL SETUP")
8 
9 #define IS_CHANNEL_SETUP(server) \
10 	(CHANNEL_SETUP(server) ? TRUE : FALSE)
11 
12 struct _CHANNEL_SETUP_REC {
13 #include "channel-setup-rec.h"
14 };
15 
16 extern GSList *setupchannels;
17 
18 void channels_setup_init(void);
19 void channels_setup_deinit(void);
20 
21 void channel_setup_create(CHANNEL_SETUP_REC *channel);
22 void channel_setup_remove(CHANNEL_SETUP_REC *channel);
23 
24 /* Remove channels attached to chatnet */
25 void channel_setup_remove_chatnet(const char *chatnet);
26 
27 CHANNEL_SETUP_REC *channel_setup_find(const char *channel,
28 				      const char *chatnet);
29 
30 #define channel_chatnet_match(rec, chatnet) \
31 	((rec) == NULL || (rec)[0] == '\0' || \
32 	 ((chatnet) != NULL && g_ascii_strcasecmp(rec, chatnet) == 0))
33 
34 #endif
35