summaryrefslogtreecommitdiff
path: root/src/irc/irc.h
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2004-12-27 16:22:39 +0000
committerSebastien Helleu <flashcode@flashtux.org>2004-12-27 16:22:39 +0000
commitf4f2ec3668624b8cf29b9dab734f9069d90a8fec (patch)
tree1559d5284d4d839044759bbafc7f5a4b60c62d55 /src/irc/irc.h
parent486e55be0255d22a2530068d2a684273003c944e (diff)
downloadweechat-f4f2ec3668624b8cf29b9dab734f9069d90a8fec.zip
auto-reconnection to server (new options: server_autoreconnect (on/off), server_autoreconnect_delay (in seconds)), disconnections are now managed without problem by WeeChat
Diffstat (limited to 'src/irc/irc.h')
-rw-r--r--src/irc/irc.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/irc/irc.h b/src/irc/irc.h
index dbbcce649..b2a4fb6b5 100644
--- a/src/irc/irc.h
+++ b/src/irc/irc.h
@@ -116,6 +116,8 @@ struct t_irc_server
/* user choices */
char *name; /* name of server (only for display) */
int autoconnect; /* = 1 if auto connect at startup */
+ int autoreconnect; /* = 1 if auto reco when disconnected */
+ int autoreconnect_delay; /* delay before trying again reconnect */
int command_line; /* server was given on command line */
char *address; /* address of server (IP or name) */
int port; /* port for server (6667 by default) */
@@ -133,6 +135,8 @@ struct t_irc_server
/* internal vars */
char *nick; /* current nickname */
int is_connected; /* 1 if WeeChat is connected to server */
+ time_t reconnect_start; /* this time + delay = reconnect time */
+ int reconnect_join; /* 1 if channels opened to rejoin */
int sock4; /* socket for server */
int is_away; /* 1 is user is marker as away */
time_t away_time; /* time() when user marking as away */
@@ -214,15 +218,16 @@ extern t_irc_server *server_alloc ();
extern void server_destroy (t_irc_server *);
extern void server_free (t_irc_server *);
extern void server_free_all ();
-extern t_irc_server *server_new (char *, int, int, char *, int, char *, char *,
- char *, char *, char *, char *, char *, int,
- char *, int);
+extern t_irc_server *server_new (char *, int, int, int, int, char *, int, char *,
+ char *, char *, char *, char *, char *, char *,
+ int, char *, int);
extern int server_send (t_irc_server *, char *, int);
extern void server_sendf (t_irc_server *, char *, ...);
extern void server_recv (t_irc_server *);
-extern int server_connect ();
+extern int server_connect (t_irc_server *);
+extern void server_reconnect (t_irc_server *);
extern void server_auto_connect (int);
-extern void server_disconnect (t_irc_server *);
+extern void server_disconnect (t_irc_server *, int);
extern void server_disconnect_all ();
extern t_irc_server *server_search (char *);
extern int server_get_number_connected ();