1 #ifndef XCHAT_SERVLIST_H
2 #define XCHAT_SERVLIST_H
4 typedef struct ircserver
27 extern GSList
*network_list
;
30 #define FLAG_USE_GLOBAL 2
31 #define FLAG_USE_SSL 4
32 #define FLAG_AUTO_CONNECT 8
33 #define FLAG_USE_PROXY 16
34 #define FLAG_ALLOW_INVALID 32
35 #define FLAG_FAVORITE 64
38 /* Login methods. Use server password by default - if we had a NickServ password, it'd be set to 2 already by servlist_load() */
39 #define LOGIN_DEFAULT_REAL LOGIN_PASS /* this is to set the default login method for unknown servers */
40 #define LOGIN_DEFAULT 0 /* this is for the login type dropdown, doesn't serve any other purpose */
41 #define LOGIN_MSG_NICKSERV 1
42 #define LOGIN_NICKSERV 2
45 #define LOGIN_MSG_NS 4
50 #define LOGIN_CHALLENGEAUTH 8
51 #define LOGIN_CUSTOM 9
52 #define LOGIN_SASLEXTERNAL 10
54 #define CHALLENGEAUTH_ALGO "HMAC-SHA-256"
55 #define CHALLENGEAUTH_NICK "Q@CServe.quakenet.org"
57 void servlist_init (void);
58 int servlist_save (void);
59 int servlist_cycle (server
*serv
);
60 void servlist_connect (session
*sess
, ircnet
*net
, gboolean join
);
61 int servlist_connect_by_netname (session
*sess
, char *network
, gboolean join
);
62 int servlist_auto_connect (session
*sess
);
63 int servlist_have_auto (void);
64 int servlist_check_encoding (char *charset
);
65 void servlist_cleanup (void);
67 ircnet
*servlist_net_add (char *name
, char *comment
, int prepend
);
68 void servlist_net_remove (ircnet
*net
);
69 ircnet
*servlist_net_find (char *name
, int *pos
, int (*cmpfunc
) (const char *, const char *));
70 ircnet
*servlist_net_find_from_server (char *server_name
);
72 void servlist_server_remove (ircnet
*net
, ircserver
*serv
);
73 ircserver
*servlist_server_add (ircnet
*net
, char *name
);
74 ircserver
*servlist_server_find (ircnet
*net
, char *name
, int *pos
);
76 void joinlist_split (char *autojoin
, GSList
**channels
, GSList
**keys
);
77 gboolean
joinlist_is_in_list (server
*serv
, char *channel
);
78 void joinlist_free (GSList
*channels
, GSList
*keys
);
79 gchar
*joinlist_merge (GSList
*channels
, GSList
*keys
);