diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-02-01 13:35:59 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-02-01 13:35:59 +0100 |
commit | 9ae942bb9d870821af7bd20726f801137f761aff (patch) | |
tree | 5eed4dd94f9217f2daafed683537a9d6a1d1e33c | |
parent | 5205be4b875c7fbc5d82818367e51ad49b667f72 (diff) | |
download | weechat-9ae942bb9d870821af7bd20726f801137f761aff.zip |
Add signal weechat_pv for private messages
-rw-r--r-- | src/gui/gui-chat.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 24b142dc6..2e0b7c40d 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -820,6 +820,7 @@ gui_chat_line_add (struct t_gui_buffer *buffer, time_t date, struct t_gui_line *new_line; struct t_gui_window *ptr_win; char *message_for_signal; + int notify_level; new_line = malloc (sizeof (*new_line)); if (!new_line) @@ -885,9 +886,19 @@ gui_chat_line_add (struct t_gui_buffer *buffer, time_t date, } else { - gui_hotlist_add (buffer, - gui_chat_line_get_notify_level (new_line), - NULL, 1); + notify_level = gui_chat_line_get_notify_level (new_line); + if (!weechat_upgrading && (notify_level == GUI_HOTLIST_PRIVATE)) + { + message_for_signal = gui_chat_build_string_prefix_message (new_line); + if (message_for_signal) + { + hook_signal_send ("weechat_pv", + WEECHAT_HOOK_SIGNAL_STRING, + message_for_signal); + free (message_for_signal); + } + } + gui_hotlist_add (buffer, notify_level, NULL, 1); } } else |