summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/hotlist.c3
-rw-r--r--src/common/hotlist.h3
-rw-r--r--src/gui/curses/gui-display.c5
-rw-r--r--src/gui/gui-common.c8
-rw-r--r--src/irc/irc-dcc.c2
-rw-r--r--src/irc/irc-recv.c4
6 files changed, 15 insertions, 10 deletions
diff --git a/src/common/hotlist.c b/src/common/hotlist.c
index 3faf7159f..690183826 100644
--- a/src/common/hotlist.c
+++ b/src/common/hotlist.c
@@ -76,7 +76,7 @@ hotlist_find_pos (t_weechat_hotlist *new_hotlist)
*/
void
-hotlist_add (int priority, t_gui_buffer *buffer)
+hotlist_add (int priority, t_irc_server *server, t_gui_buffer *buffer)
{
t_weechat_hotlist *new_hotlist, *pos_hotlist;
@@ -104,6 +104,7 @@ hotlist_add (int priority, t_gui_buffer *buffer)
}
new_hotlist->priority = priority;
+ new_hotlist->server = server;
new_hotlist->buffer = buffer;
if (hotlist)
diff --git a/src/common/hotlist.h b/src/common/hotlist.h
index b8d310887..e4759ef96 100644
--- a/src/common/hotlist.h
+++ b/src/common/hotlist.h
@@ -34,6 +34,7 @@ struct t_weechat_hotlist
{
int priority; /* 0=crappy msg (join/part), 1=msg, */
/* 2=pv, 3=nick highlight */
+ t_irc_server *server; /* associated server */
t_gui_buffer *buffer; /* associated buffer */
t_weechat_hotlist *prev_hotlist; /* link to previous hotlist */
t_weechat_hotlist *next_hotlist; /* link to next hotlist */
@@ -42,7 +43,7 @@ struct t_weechat_hotlist
extern t_weechat_hotlist *hotlist;
extern t_gui_buffer *hotlist_initial_buffer;
-extern void hotlist_add (int, t_gui_buffer *);
+extern void hotlist_add (int, t_irc_server *, t_gui_buffer *);
extern void hotlist_free (t_weechat_hotlist *);
extern void hotlist_free_all ();
extern void hotlist_remove_buffer (t_gui_buffer *);
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index 782f401f6..4ed866a43 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -2164,7 +2164,10 @@ gui_draw_buffer_status (t_gui_buffer *buffer, int erase)
else
snprintf (format, sizeof (format) - 1, "%%.%ds", cfg_look_hotlist_names_length);
if (BUFFER_IS_SERVER(ptr_hotlist->buffer))
- wprintw (ptr_win->win_status, format, SERVER(ptr_hotlist->buffer)->name);
+ wprintw (ptr_win->win_status, format,
+ (ptr_hotlist->server) ?
+ ptr_hotlist->server->name :
+ SERVER(ptr_hotlist->buffer)->name);
else if (BUFFER_IS_CHANNEL(ptr_hotlist->buffer)
|| BUFFER_IS_PRIVATE(ptr_hotlist->buffer))
wprintw (ptr_win->win_status, format, CHANNEL(ptr_hotlist->buffer)->name);
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index 88839d3c4..d2e53639e 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -844,13 +844,13 @@ gui_add_to_line (t_gui_buffer *buffer, int type, char *message)
buffer->notify_level)
{
if (buffer->last_line->line_with_highlight)
- hotlist_add (HOTLIST_HIGHLIGHT, buffer);
+ hotlist_add (HOTLIST_HIGHLIGHT, SERVER(buffer), buffer);
else if (BUFFER_IS_PRIVATE(buffer) && (buffer->last_line->line_with_message))
- hotlist_add (HOTLIST_PRIVATE, buffer);
+ hotlist_add (HOTLIST_PRIVATE, SERVER(buffer), buffer);
else if (buffer->last_line->line_with_message)
- hotlist_add (HOTLIST_MSG, buffer);
+ hotlist_add (HOTLIST_MSG, SERVER(buffer), buffer);
else
- hotlist_add (HOTLIST_LOW, buffer);
+ hotlist_add (HOTLIST_LOW, SERVER(buffer), buffer);
gui_draw_buffer_status (gui_current_window->buffer, 1);
}
}
diff --git a/src/irc/irc-dcc.c b/src/irc/irc-dcc.c
index 6bbfe8a48..2729d100a 100644
--- a/src/irc/irc-dcc.c
+++ b/src/irc/irc-dcc.c
@@ -60,7 +60,7 @@ dcc_redraw (int highlight)
gui_redraw_buffer (gui_get_dcc_buffer (gui_current_window));
if (highlight)
{
- hotlist_add (highlight, gui_get_dcc_buffer (gui_current_window));
+ hotlist_add (highlight, NULL, gui_get_dcc_buffer (gui_current_window));
gui_draw_buffer_status (gui_current_window->buffer, 0);
}
}
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index d0af719c5..42648447c 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -365,7 +365,7 @@ irc_cmd_recv_invite (t_irc_server *server, char *host, char *nick, char *argumen
GUI_COLOR(COLOR_WIN_CHAT),
GUI_COLOR(COLOR_WIN_CHAT_NICK),
nick);
- hotlist_add (HOTLIST_HIGHLIGHT, server->buffer);
+ hotlist_add (HOTLIST_HIGHLIGHT, server, server->buffer);
gui_draw_buffer_status (gui_current_window->buffer, 1);
}
}
@@ -1290,7 +1290,7 @@ irc_cmd_recv_notice (t_irc_server *server, char *host, char *nick, char *argumen
(ascii_strcasecmp (nick, "chanserv") != 0) &&
(ascii_strcasecmp (nick, "memoserv") != 0))
{
- hotlist_add (HOTLIST_PRIVATE, server->buffer);
+ hotlist_add (HOTLIST_PRIVATE, server, server->buffer);
gui_draw_buffer_status (gui_current_window->buffer, 1);
}
}