summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2004-01-19 17:52:08 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2004-01-19 17:52:08 +0000
commite980500702b420f0e01ce5aab9084c06594fe214 (patch)
tree033b614ff93c020b2eec528aa6c528ccb310bd20
parent623dbac5cf488fca5958a537b690923a2e279935 (diff)
downloadirssi-e980500702b420f0e01ce5aab9084c06594fe214.zip
Say when we're reconnecting, and mention it can be aborted with /RMRECONNS
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3204 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/core/server-connect-rec.h3
-rw-r--r--src/core/servers-reconnect.c1
-rw-r--r--src/fe-common/core/fe-server.c4
-rw-r--r--src/fe-common/core/module-formats.c1
-rw-r--r--src/fe-common/core/module-formats.h3
5 files changed, 9 insertions, 3 deletions
diff --git a/src/core/server-connect-rec.h b/src/core/server-connect-rec.h
index a52e5b0a..cfbe3eba 100644
--- a/src/core/server-connect-rec.h
+++ b/src/core/server-connect-rec.h
@@ -31,7 +31,8 @@ char *ssl_capath;
GIOChannel *connect_handle; /* connect using this handle */
/* when reconnecting, the old server status */
-unsigned int reconnection:1; /* we're trying to reconnect */
+unsigned int reconnection:1; /* we're trying to reconnect a connected server */
+unsigned int reconnecting:1; /* we're trying to reconnect any connection */
unsigned int no_autojoin_channels:1; /* don't autojoin any channels */
unsigned int unix_socket:1; /* Connect using named unix socket */
unsigned int use_ssl:1; /* this connection uses SSL */
diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c
index fd91be4e..9b164a39 100644
--- a/src/core/servers-reconnect.c
+++ b/src/core/servers-reconnect.c
@@ -71,6 +71,7 @@ static void server_reconnect_add(SERVER_CONNECT_REC *conn,
rec->next_connect = next_connect;
rec->conn = conn;
+ conn->reconnecting = TRUE;
server_connect_ref(conn);
reconnects = g_slist_append(reconnects, rec);
diff --git a/src/fe-common/core/fe-server.c b/src/fe-common/core/fe-server.c
index 84052afb..5ecacbbc 100644
--- a/src/fe-common/core/fe-server.c
+++ b/src/fe-common/core/fe-server.c
@@ -284,7 +284,9 @@ static void sig_server_connecting(SERVER_REC *server, IPADDR *ip)
else
net_ip2host(ip, ipaddr);
- printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CONNECTING,
+ printformat(server, NULL, MSGLEVEL_CLIENTNOTICE,
+ !server->connrec->reconnecting ?
+ TXT_CONNECTING : TXT_RECONNECTING,
server->connrec->address, ipaddr, server->connrec->port);
}
diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c
index c70f1e04..0342f7e8 100644
--- a/src/fe-common/core/module-formats.c
+++ b/src/fe-common/core/module-formats.c
@@ -71,6 +71,7 @@ FORMAT_REC fecommon_core_formats[] = {
{ "looking_up", "Looking up {server $0}", 1, { 0 } },
{ "connecting", "Connecting to {server $0} [$1] port {hilight $2}", 3, { 0, 0, 1 } },
+ { "reconnecting", "Reconnecting to {server $0} [$1] port {hilight $2} - use /RMRECONNS to abort", 3, { 0, 0, 1 } },
{ "connection_established", "Connection to {server $0} established", 1, { 0 } },
{ "cant_connect", "Unable to connect server {server $0} port {hilight $1} {reason $2}", 3, { 0, 1, 0 } },
{ "connection_lost", "Connection lost to {server $0}", 1, { 0 } },
diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h
index 5f28f0e1..d0092bd6 100644
--- a/src/fe-common/core/module-formats.h
+++ b/src/fe-common/core/module-formats.h
@@ -48,7 +48,8 @@ enum {
TXT_LOOKING_UP,
TXT_CONNECTING,
- TXT_CONNECTION_ESTABLISHED,
+ TXT_RECONNECTING,
+ TXT_CONNECTION_ESTABLISHED,
TXT_CANT_CONNECT,
TXT_CONNECTION_LOST,
TXT_LAG_DISCONNECTED,