Handling commands after /disconnect
This commit is contained in:
@@ -243,26 +243,38 @@ win_show_wins(void)
|
||||
case WIN_CHAT:
|
||||
wprintw(_cons_win, "%d: chat %s", i + 1, _wins[i].from);
|
||||
PContact contact = contact_list_get_contact(_wins[i].from);
|
||||
if (p_contact_name(contact) != NULL) {
|
||||
wprintw(_cons_win, " (%s)", p_contact_name(contact));
|
||||
|
||||
if (contact != NULL) {
|
||||
if (p_contact_name(contact) != NULL) {
|
||||
wprintw(_cons_win, " (%s)", p_contact_name(contact));
|
||||
}
|
||||
wprintw(_cons_win, " - %s", p_contact_presence(contact));
|
||||
}
|
||||
wprintw(_cons_win, " - %s", p_contact_presence(contact));
|
||||
|
||||
if (_wins[i].unread > 0) {
|
||||
wprintw(_cons_win, ", %d unread", _wins[i].unread);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case WIN_PRIVATE:
|
||||
wprintw(_cons_win, "%d: private %s", i + 1, _wins[i].from);
|
||||
|
||||
if (_wins[i].unread > 0) {
|
||||
wprintw(_cons_win, ", %d unread", _wins[i].unread);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case WIN_MUC:
|
||||
wprintw(_cons_win, "%d: room %s", i + 1, _wins[i].from);
|
||||
|
||||
if (_wins[i].unread > 0) {
|
||||
wprintw(_cons_win, ", %d unread", _wins[i].unread);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -976,7 +988,7 @@ win_disconnected(void)
|
||||
// show message in all active chats
|
||||
for (i = 1; i < NUM_WINS; i++) {
|
||||
if (strcmp(_wins[i].from, "") != 0) {
|
||||
WINDOW *win = _wins[_curr_prof_win].win;
|
||||
WINDOW *win = _wins[i].win;
|
||||
_win_show_time(win);
|
||||
wattron(win, COLOUR_ERR);
|
||||
wprintw(win, "%s\n", "Lost connection.");
|
||||
|
||||
Reference in New Issue
Block a user