summary refs log tree commit diff stats
path: root/src/common/servlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/servlist.h')
-rw-r--r--src/common/servlist.h57
1 files changed, 46 insertions, 11 deletions
diff --git a/src/common/servlist.h b/src/common/servlist.h
index b652f463..92100b9b 100644
--- a/src/common/servlist.h
+++ b/src/common/servlist.h
@@ -25,6 +25,17 @@ typedef struct ircserver
 	char *hostname;
 } ircserver;
 
+typedef struct commandentry
+{
+	char *command;
+} commandentry;
+
+typedef struct favchannel
+{
+	char *name;
+	char *key;
+} favchannel;
+
 typedef struct ircnet
 {
 	char *name;
@@ -33,14 +44,12 @@ typedef struct ircnet
 	char *user;
 	char *real;
 	char *pass;
-	char *saslpass;
-	char *autojoin;
-	char *command;
-	char *nickserv;
-	int nstype;
+	int logintype;
 	char *comment;
 	char *encoding;
 	GSList *servlist;
+	GSList *commandlist;
+	GSList *favchanlist;
 	int selected;
 	guint32 flags;
 } ircnet;
@@ -49,13 +58,24 @@ extern GSList *network_list;
 
 #define FLAG_CYCLE				1
 #define FLAG_USE_GLOBAL			2
-#define FLAG_USE_SSL				4
+#define FLAG_USE_SSL			4
 #define FLAG_AUTO_CONNECT		8
 #define FLAG_USE_PROXY			16
 #define FLAG_ALLOW_INVALID		32
 #define FLAG_FAVORITE			64
 #define FLAG_COUNT				7
 
+/* Login methods. Use server password by default - if we had a NickServ password, it'd be set to 2 already by servlist_load() */
+#define LOGIN_DEFAULT_REAL		LOGIN_PASS		/* this is to set the default login method for unknown servers */
+#define LOGIN_DEFAULT			0				/* this is for the login type dropdown, doesn't serve any other purpose */
+#define LOGIN_MSG_NICKSERV		1
+#define LOGIN_NICKSERV			2
+#define LOGIN_NS				3
+#define LOGIN_MSG_NS			4
+#define LOGIN_AUTH				5
+#define LOGIN_SASL				6
+#define LOGIN_PASS				7
+
 /* DEFAULT_CHARSET is already defined in wingdi.h */
 #define IRC_DEFAULT_CHARSET		"UTF-8 (Unicode)"
 
@@ -74,13 +94,28 @@ void servlist_net_remove (ircnet *net);
 ircnet *servlist_net_find (char *name, int *pos, int (*cmpfunc) (const char *, const char *));
 ircnet *servlist_net_find_from_server (char *server_name);
 
-void servlist_server_remove (ircnet *net, ircserver *serv);
-ircserver *servlist_server_add (ircnet *net, char *name);
 ircserver *servlist_server_find (ircnet *net, char *name, int *pos);
+commandentry *servlist_command_find (ircnet *net, char *cmd, int *pos);
+favchannel *servlist_favchan_find (ircnet *net, char *channel, int *pos);
+
+ircserver *servlist_server_add (ircnet *net, char *name);
+commandentry *servlist_command_add (ircnet *net, char *command);
+void servlist_favchan_add (ircnet *net, char *channel);
+
+void servlist_command_free (commandentry *entry);
+void servlist_favchan_free (favchannel *channel);
+
+void servlist_server_remove (ircnet *net, ircserver *serv);
+void servlist_command_remove (ircnet *net, commandentry *entry);
+void servlist_favchan_remove (ircnet *net, favchannel *channel);
+
+favchannel *servlist_favchan_copy (favchannel *fav);
+GSList *servlist_favchan_listadd (GSList *chanlist, char *channel, char *key);
 
-void joinlist_split (char *autojoin, GSList **channels, GSList **keys);
 gboolean joinlist_is_in_list (server *serv, char *channel);
-void joinlist_free (GSList *channels, GSList *keys);
-gchar *joinlist_merge (GSList *channels, GSList *keys);
 
+/* FIXME
+void joinlist_split (char *autojoin, GSList **channels, GSList **keys);
+void joinlist_free (GSList *channels, GSList *keys);
+*/
 #endif