1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Show warning when sending message to offline contact

This commit is contained in:
James Booth 2012-10-04 23:33:38 +01:00
parent e486114e05
commit 9f08744ec0

View File

@ -370,6 +370,13 @@ win_show_outgoing_msg(const char * const from, const char * const to,
win_index = _new_prof_win(to); win_index = _new_prof_win(to);
WINDOW *win = _wins[win_index].win; WINDOW *win = _wins[win_index].win;
if (strcmp(p_contact_show(contact), "offline") == 0) {
const char const *show = p_contact_show(contact);
const char const *status = p_contact_status(contact);
_show_status_string(win, to, show, status, "--", "offline");
}
_win_show_time(win); _win_show_time(win);
_win_show_user(win, from, 0); _win_show_user(win, from, 0);
_win_show_message(win, message); _win_show_message(win, message);