summaryrefslogtreecommitdiff
path: root/src/core/channels-setup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/channels-setup.h')
-rw-r--r--src/core/channels-setup.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/core/channels-setup.h b/src/core/channels-setup.h
new file mode 100644
index 00000000..e30893fe
--- /dev/null
+++ b/src/core/channels-setup.h
@@ -0,0 +1,33 @@
+#ifndef __CHANNELS_SETUP_H
+#define __CHANNELS_SETUP_H
+
+#include "modules.h"
+
+typedef struct {
+ char *name;
+ char *chatnet;
+ char *password;
+
+ char *botmasks;
+ char *autosendcmd;
+
+ int autojoin:1;
+ GHashTable *module_data;
+} CHANNEL_SETUP_REC;
+
+extern GSList *setupchannels;
+
+void channels_setup_init(void);
+void channels_setup_deinit(void);
+
+void channels_setup_create(CHANNEL_SETUP_REC *channel);
+void channels_setup_destroy(CHANNEL_SETUP_REC *channel);
+
+CHANNEL_SETUP_REC *channels_setup_find(const char *channel,
+ const char *chatnet);
+
+#define channel_chatnet_match(rec, chatnet) \
+ ((rec) == NULL || (rec)[0] == '\0' || \
+ ((chatnet) != NULL && g_strcasecmp(rec, chatnet) == 0))
+
+#endif