summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-09-30 15:39:25 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-09-30 15:39:25 +0200
commit12421a67da6c80c1b1cbdbf9241d18263673bdb2 (patch)
tree59971f3e6f0df7710306d64d9f07610e2fb8d17d /src/plugins/irc/irc-command.c
parent9fa560300ff99bb6f57a0b8350da83d34cd60711 (diff)
downloadweechat-12421a67da6c80c1b1cbdbf9241d18263673bdb2.zip
Set unread marker for IRC server/channels/pv buffers when using /away command
Diffstat (limited to 'src/plugins/irc/irc-command.c')
-rw-r--r--src/plugins/irc/irc-command.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 5604c4a0b..dd69d7684 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -256,6 +256,7 @@ irc_command_away_server (struct t_irc_server *server, const char *arguments)
{
char *string, buffer[4096];
time_t time_now, elapsed;
+ struct t_irc_channel *ptr_channel;
if (!server)
return;
@@ -291,14 +292,16 @@ irc_command_away_server (struct t_irc_server *server, const char *arguments)
free (string);
}
irc_server_set_away (server, server->nick, 1);
- /*for (ptr_window = gui_windows; ptr_window;
- ptr_window = ptr_window->next_window)
+
+ /* reset "unread" indicator on server and channels/pv buffers */
+ if (!weechat_config_boolean (irc_config_look_one_server_buffer))
+ weechat_buffer_set (server->buffer, "unread", "");
+ for (ptr_channel = server->channels; ptr_channel;
+ ptr_channel = ptr_channel->next_channel)
{
- if (strcmp (ptr_window->buffer->category, server->name) == 0)
- ptr_window->buffer->last_read_line =
- ptr_window->buffer->last_line;
+ weechat_buffer_set (ptr_channel->buffer, "unread", "");
}
- */
+ weechat_printf (NULL, "set unread");
}
else
{