summaryrefslogtreecommitdiff
path: root/src/irc/irc-display.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-01-03 23:40:22 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-01-03 23:40:22 +0000
commit96fc2c9aec8f290110f17069e37e773fcb679629 (patch)
tree2c82e47b1d263588416bf0200691eabc059f1d4f /src/irc/irc-display.c
parentaca19813ad750b59249e6682809b39eb3431838f (diff)
downloadweechat-96fc2c9aec8f290110f17069e37e773fcb679629.zip
Server & error messages now prefixed, /server command modified, ~/.weechat/logs dir can be read/write by user only
Diffstat (limited to 'src/irc/irc-display.c')
-rw-r--r--src/irc/irc-display.c73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/irc/irc-display.c b/src/irc/irc-display.c
index 88ca46b01..78378198c 100644
--- a/src/irc/irc-display.c
+++ b/src/irc/irc-display.c
@@ -133,3 +133,76 @@ irc_display_mode (t_gui_buffer *buffer, char *channel_name, char set_flag,
else
gui_printf_color (buffer, COLOR_WIN_CHAT, " %s\n", message);
}
+
+/*
+ * irc_display_server: display server description
+ */
+
+void
+irc_display_server (t_irc_server *server)
+{
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT, _("Server: "));
+ gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s", server->name);
+ gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " [");
+ gui_printf_color (NULL, COLOR_WIN_CHAT, "%s",
+ (server->is_connected) ?
+ _("connected") : _("not connected"));
+ gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_autoconnect : %s%s\n",
+ (server->autoconnect) ? _("yes") : _("no"),
+ (server->command_line) ?
+ _(" (temporary server, will not be saved)") : "");
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_autoreconnect . . .: %s\n",
+ (server->autoreconnect) ? _("yes") : _("no"));
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_autoreconnect_delay: %d seconds\n",
+ server->autoreconnect_delay);
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_address . . . . . .: %s\n",
+ server->address);
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_port . . . . . . .: %d\n",
+ server->port);
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_password . . . . .: %s\n",
+ (server->password && server->password[0]) ?
+ _("(hidden)") : "");
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_nick1/2/3 . . . . .: %s", server->nick1);
+ gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " / ");
+ gui_printf_color (NULL, COLOR_WIN_CHAT, "%s", server->nick2);
+ gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " / ");
+ gui_printf_color (NULL, COLOR_WIN_CHAT, "%s\n", server->nick3);
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_username . . . . .: %s\n",
+ server->username);
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_realname . . . . .: %s\n",
+ server->realname);
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_command . . . . . .: %s\n",
+ (server->command && server->command[0]) ?
+ server->command : "");
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_command_delay . . .: %d seconds\n",
+ server->command_delay);
+ irc_display_prefix (NULL, PREFIX_INFO);
+ gui_printf_color (NULL, COLOR_WIN_CHAT,
+ " server_autojoin . . . . .: %s\n",
+ (server->autojoin && server->autojoin[0]) ?
+ server->autojoin : "");
+}