From d5affecc23554c886d81c4b735dca42ac2fd0bd2 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 19 Nov 2005 22:08:46 +0000 Subject: Added read marker (indicator for first unread line), added quotes and spaces in config files --- src/irc/irc-display.c | 12 +++++++----- src/irc/irc-recv.c | 19 +++++++++++++++++++ src/irc/irc-send.c | 15 +++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) (limited to 'src/irc') diff --git a/src/irc/irc-display.c b/src/irc/irc-display.c index 6c60eaa4f..da1e9aae8 100644 --- a/src/irc/irc-display.c +++ b/src/irc/irc-display.c @@ -179,7 +179,7 @@ irc_display_server (t_irc_server *server) gui_printf (NULL, "\n"); gui_printf (NULL, _("%sServer: %s%s %s[%s%s%s]\n"), GUI_COLOR(COLOR_WIN_CHAT), - GUI_COLOR(COLOR_WIN_CHAT_CHANNEL), + GUI_COLOR(COLOR_WIN_CHAT_SERVER), server->name, GUI_COLOR(COLOR_WIN_CHAT_DARK), GUI_COLOR(COLOR_WIN_CHAT), @@ -193,8 +193,9 @@ irc_display_server (t_irc_server *server) _(" (temporary server, will not be saved)") : ""); gui_printf (NULL, " server_autoreconnect . . .: %s\n", (server->autoreconnect) ? _("on") : _("off")); - gui_printf (NULL, " server_autoreconnect_delay: %d seconds\n", - server->autoreconnect_delay); + gui_printf (NULL, " server_autoreconnect_delay: %d %s\n", + server->autoreconnect_delay, + _("seconds")); gui_printf (NULL, " server_address . . . . . .: %s\n", server->address); gui_printf (NULL, " server_port . . . . . . .: %d\n", @@ -221,8 +222,9 @@ irc_display_server (t_irc_server *server) gui_printf (NULL, " server_command . . . . . .: %s\n", (server->command && server->command[0]) ? server->command : ""); - gui_printf (NULL, " server_command_delay . . .: %d seconds\n", - server->command_delay); + gui_printf (NULL, " server_command_delay . . .: %d %s\n", + server->command_delay, + _("seconds")); gui_printf (NULL, " server_autojoin . . . . .: %s\n", (server->autojoin && server->autojoin[0]) ? server->autojoin : ""); diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index 68e2ff493..55c203194 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -2680,6 +2680,8 @@ irc_cmd_recv_303 (t_irc_server *server, char *host, char *nick, char *arguments) int irc_cmd_recv_305 (t_irc_server *server, char *host, char *nick, char *arguments) { + t_gui_window *ptr_window; + /* make gcc happy */ (void) host; (void) nick; @@ -2699,6 +2701,12 @@ irc_cmd_recv_305 (t_irc_server *server, char *host, char *nick, char *arguments) } server->is_away = 0; server->away_time = 0; + for (ptr_window = gui_windows; ptr_window; + ptr_window = ptr_window->next_window) + { + if (SERVER(ptr_window->buffer) == server) + gui_draw_buffer_status (ptr_window->buffer, 1); + } return 0; } @@ -2709,6 +2717,8 @@ irc_cmd_recv_305 (t_irc_server *server, char *host, char *nick, char *arguments) int irc_cmd_recv_306 (t_irc_server *server, char *host, char *nick, char *arguments) { + t_gui_window *ptr_window; + /* make gcc happy */ (void) host; (void) nick; @@ -2728,6 +2738,15 @@ irc_cmd_recv_306 (t_irc_server *server, char *host, char *nick, char *arguments) } server->is_away = 1; server->away_time = time (NULL); + for (ptr_window = gui_windows; ptr_window; + ptr_window = ptr_window->next_window) + { + if (SERVER(ptr_window->buffer) == server) + gui_draw_buffer_status (ptr_window->buffer, 1); + if (SERVER(ptr_window->buffer) == server) + ptr_window->buffer->last_read_line = + ptr_window->buffer->last_line; + } return 0; } diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c index 5802fcd34..bd03d9126 100644 --- a/src/irc/irc-send.c +++ b/src/irc/irc-send.c @@ -196,6 +196,7 @@ irc_cmd_send_away (t_irc_server *server, char *arguments) char *pos, *ptr_away_msg; char *ptr_away_default_msg = "away"; t_irc_server *ptr_server; + t_gui_window *ptr_window; time_t elapsed; char buffer[4096]; char *string; @@ -251,6 +252,13 @@ irc_cmd_send_away (t_irc_server *server, char *arguments) free (string); } server_set_away (ptr_server, ptr_server->nick, 1); + for (ptr_window = gui_windows; ptr_window; + ptr_window = ptr_window->next_window) + { + if (SERVER(ptr_window->buffer) == ptr_server) + ptr_window->buffer->last_read_line = + ptr_window->buffer->last_line; + } } } } @@ -291,6 +299,13 @@ irc_cmd_send_away (t_irc_server *server, char *arguments) irc_send_me_all_channels (server, buffer); } server_set_away (server, server->nick, 1); + for (ptr_window = gui_windows; ptr_window; + ptr_window = ptr_window->next_window) + { + if (SERVER(ptr_window->buffer) == server) + ptr_window->buffer->last_read_line = + ptr_window->buffer->last_line; + } } } gui_draw_buffer_status (gui_current_window->buffer, 1); -- cgit v1.2.3