summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-02-19 14:50:53 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-02-19 14:50:53 +0000
commit8f98e4b6083e49a10dd2bc2994372449af9f9266 (patch)
treee10325b129e661eb20f5cdf38430cb58ca557465 /src
parentbd92708f22974dd203541f50acdf8c034e41a950 (diff)
downloadirssi-8f98e4b6083e49a10dd2bc2994372449af9f9266.zip
/SERVER: if there's no servers, print "Not connected to any servers"
instead of just being quiet. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1261 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/fe-server.c12
-rw-r--r--src/fe-common/core/module-formats.c5
-rw-r--r--src/fe-common/core/module-formats.h1
3 files changed, 13 insertions, 5 deletions
diff --git a/src/fe-common/core/fe-server.c b/src/fe-common/core/fe-server.c
index a1c07db0..6abc4374 100644
--- a/src/fe-common/core/fe-server.c
+++ b/src/fe-common/core/fe-server.c
@@ -191,9 +191,15 @@ static void cmd_server(const char *data, SERVER_REC *server, void *item)
void *free_arg;
if (*data == '\0') {
- print_servers();
- print_lookup_servers();
- print_reconnects();
+ if (servers == NULL && lookup_servers == NULL &&
+ reconnects == NULL) {
+ printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
+ TXT_NO_CONNECTED_SERVERS);
+ } else {
+ print_servers();
+ print_lookup_servers();
+ print_reconnects();
+ }
signal_stop();
return;
diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c
index f09054c3..b7425710 100644
--- a/src/fe-common/core/module-formats.c
+++ b/src/fe-common/core/module-formats.c
@@ -56,6 +56,7 @@ FORMAT_REC fecommon_core_formats[] = {
{ "server_quit", "Disconnecting from server {server $0}: {reason $1}", 2, { 0, 0 } },
{ "server_changed", "Changed to {hilight $2} server {server $1}", 3, { 0, 0, 0 } },
{ "unknown_server_tag", "Unknown server tag {server $0}", 1, { 0 } },
+ { "no_connected_servers", "Not connected to any servers", 0 },
{ "server_list", "{server $0}: $1:$2 ($3)", 5, { 0, 0, 1, 0, 0 } },
{ "server_lookup_list", "{server $0}: $1:$2 ($3) (connecting...)", 5, { 0, 0, 1, 0, 0 } },
{ "server_reconnect_list", "{server $0}: $1:$2 ($3) ($5 left before reconnecting)", 6, { 0, 0, 1, 0, 0, 0 } },
@@ -176,8 +177,8 @@ FORMAT_REC fecommon_core_formats[] = {
{ "option_ambiguous", "Ambiguous option: $0", 1, { 0 } },
{ "option_missing_arg", "Missing required argument for: $0", 1, { 0 } },
{ "not_enough_params", "Not enough parameters given", 0 },
- { "not_connected", "Not connected to IRC server yet", 0 },
- { "not_joined", "Not joined to any channels yet", 0 },
+ { "not_connected", "Not connected to server", 0 },
+ { "not_joined", "Not joined to any channel", 0 },
{ "chan_not_found", "Not joined to such channel", 0 },
{ "chan_not_synced", "Channel not fully synchronized yet, try again after a while", 0 },
{ "not_good_idea", "Doing this is not a good idea. Add -YES if you really mean it", 0 },
diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h
index c41ca316..edb9e6cb 100644
--- a/src/fe-common/core/module-formats.h
+++ b/src/fe-common/core/module-formats.h
@@ -33,6 +33,7 @@ enum {
TXT_SERVER_QUIT,
TXT_SERVER_CHANGED,
TXT_UNKNOWN_SERVER_TAG,
+ TXT_NO_CONNECTED_SERVERS,
TXT_SERVER_LIST,
TXT_SERVER_LOOKUP_LIST,
TXT_SERVER_RECONNECT_LIST,