summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-03-19 00:46:41 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-03-19 00:46:41 +0000
commitc701648ab303fc5528c27e44bf14c638d99a58a6 (patch)
treeb1565b2293768c3c975461cedf1ec5b74ea57002
parent6b96becc795de7a7c421ba8c3c1f6a4912729dcd (diff)
downloadirssi-c701648ab303fc5528c27e44bf14c638d99a58a6.zip
Server reconnection tries always the first server in the list where
connection hasn't failed for the last half an hour. If all have failed, just try connecting to any of them. +several code cleanups. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@157 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/common-setup.h74
1 files changed, 39 insertions, 35 deletions
diff --git a/src/common-setup.h b/src/common-setup.h
index ace90a8c..9e2e2892 100644
--- a/src/common-setup.h
+++ b/src/common-setup.h
@@ -26,46 +26,50 @@
extern GList *aliases, *ignores, *completions, *notifies, *hilights, *replaces, *popups;
/* servers */
-typedef struct
-{
- gchar *server;
- gchar *ircnet;
- gchar *password;
- gint port;
- gboolean autoconnect;
- gint cmd_queue_speed; /* override the default if > 0 */
- time_t last_connect; /* to avoid reconnecting too fast.. */
-}
-SETUP_SERVER_REC;
-
-typedef struct
-{
- gchar *name;
- gchar *nick;
- gchar *username;
- gchar *realname;
- gint max_kicks, max_msgs, max_modes; /* max. number of kicks/msgs/mode changes per command */
-}
-IRCNET_REC;
+typedef struct {
+ char *server;
+ int port;
+
+ char *ircnet;
+ char *password;
+ int autoconnect;
+ int cmd_queue_speed; /* override the default if > 0 */
+
+ char *own_address; /* address to use when connecting this server */
+ IPADDR own_ip; /* resolved own_address or full of zeros */
+
+ time_t last_connect; /* to avoid reconnecting too fast.. */
+ int last_failed; /* if last connection attempt failed */
+} SETUP_SERVER_REC;
+
+typedef struct {
+ char *name;
+
+ char *nick;
+ char *username;
+ char *realname;
+
+ /* max. number of kicks/msgs/mode changes per command */
+ int max_kicks, max_msgs, max_modes;
+} IRCNET_REC;
extern GList *setupservers; /* list of local servers */
extern GList *ircnets; /* list of available ircnets */
/* channels */
-typedef struct
-{
- gboolean autojoin;
- gchar *name;
- gchar *ircnet;
- gchar *password;
-
- gchar *botmasks;
- gchar *autosendcmd;
-
- gchar *background;
- gchar *font;
-}
-SETUP_CHANNEL_REC;
+typedef struct {
+ int autojoin;
+
+ char *name;
+ char *ircnet;
+ char *password;
+
+ char *botmasks;
+ char *autosendcmd;
+
+ char *background;
+ char *font;
+} SETUP_CHANNEL_REC;
extern GList *setupchannels;