Replace various network options with universal login method option
[rofl0r-ixchat.git] / src / common / servlist.h
blob90183bb8346776b9010b06a7f0507c8989eed008
1 #ifndef XCHAT_SERVLIST_H
2 #define XCHAT_SERVLIST_H
4 typedef struct ircserver
6 char *hostname;
7 } ircserver;
9 typedef struct ircnet
11 char *name;
12 char *nick;
13 char *nick2;
14 char *user;
15 char *real;
16 char *pass;
17 char *autojoin;
18 char *command;
19 char *nickserv;
20 int logintype;
21 char *comment;
22 char *encoding;
23 GSList *servlist;
24 int selected;
25 guint32 flags;
26 } ircnet;
28 extern GSList *network_list;
30 #define FLAG_CYCLE 1
31 #define FLAG_USE_GLOBAL 2
32 #define FLAG_USE_SSL 4
33 #define FLAG_AUTO_CONNECT 8
34 #define FLAG_USE_PROXY 16
35 #define FLAG_ALLOW_INVALID 32
36 #define FLAG_FAVORITE 64
37 #define FLAG_COUNT 7
39 void servlist_init (void);
40 int servlist_save (void);
41 int servlist_cycle (server *serv);
42 void servlist_connect (session *sess, ircnet *net, gboolean join);
43 int servlist_connect_by_netname (session *sess, char *network, gboolean join);
44 int servlist_auto_connect (session *sess);
45 int servlist_have_auto (void);
46 int servlist_check_encoding (char *charset);
47 void servlist_cleanup (void);
49 ircnet *servlist_net_add (char *name, char *comment, int prepend);
50 void servlist_net_remove (ircnet *net);
51 ircnet *servlist_net_find (char *name, int *pos, int (*cmpfunc) (const char *, const char *));
52 ircnet *servlist_net_find_from_server (char *server_name);
54 void servlist_server_remove (ircnet *net, ircserver *serv);
55 ircserver *servlist_server_add (ircnet *net, char *name);
56 ircserver *servlist_server_find (ircnet *net, char *name, int *pos);
58 void joinlist_split (char *autojoin, GSList **channels, GSList **keys);
59 gboolean joinlist_is_in_list (server *serv, char *channel);
60 void joinlist_free (GSList *channels, GSList *keys);
61 gchar *joinlist_merge (GSList *channels, GSList *keys);
63 #endif