#ifndef __CONFIG_SERVERS_H #define __CONFIG_SERVERS_H #include #include #include #define SERV_CHAN_MAX_NUM 16 typedef struct irc_server_conf { char *name; char *user; char *password; char *server; char *port; int ssl; int enabled; char *channels[SERV_CHAN_MAX_NUM]; int connected; //show that was allready connected to chan } irc_server_conf; void free_irc_server_conf(irc_server_conf *isc); static irc_server_conf server_list[] __attribute__((used)) = //default values { /* { .user = "cbot_git", .password = "asdsada", .server = "irc.freenode.net", .channels = {"#mainlv","#developerslv","#meeseekeria",NULL}, .port = "6667", .ssl = 0, }, { .user = "cbot_git", .password = "asdaasda", .server = "localhost", .channels = {"#default","#bots",NULL}, .port = "9000", .ssl = 0 }, */ { .user = "cbot_git", .password = "asdaasda", .server = "localhost", .channels = {"#default","#bots",NULL}, .port = "6667", .ssl = 0 } }; #define SIZEOF_SERVER_LIST (sizeof(server_list)/sizeof(irc_server_conf)) #endif