PREF_STATUSES, moved checks to profanity module
Removed checks from muc presence, and when contact is offline on message
This commit is contained in:
@@ -400,15 +400,13 @@ ui_contact_online(const char * const barejid, const char * const resource,
|
||||
}
|
||||
|
||||
ProfWin *console = wins_get_console();
|
||||
ProfWin *window = wins_get_by_recipient(barejid);
|
||||
_show_status_string(console, display_str->str, show, status, last_activity,
|
||||
"++", "online");
|
||||
|
||||
if (prefs_get_boolean(PREF_STATUSES)) {
|
||||
_show_status_string(console, display_str->str, show, status, last_activity,
|
||||
"++", "online");
|
||||
if (window != NULL) {
|
||||
_show_status_string(window, display_str->str, show, status,
|
||||
last_activity, "++", "online");
|
||||
}
|
||||
ProfWin *window = wins_get_by_recipient(barejid);
|
||||
if (window != NULL) {
|
||||
_show_status_string(window, display_str->str, show, status,
|
||||
last_activity, "++", "online");
|
||||
}
|
||||
|
||||
jid_destroy(jid);
|
||||
@@ -444,15 +442,13 @@ ui_contact_offline(const char * const from, const char * const show,
|
||||
}
|
||||
|
||||
ProfWin *console = wins_get_console();
|
||||
ProfWin *window = wins_get_by_recipient(jidp->barejid);
|
||||
_show_status_string(console, display_str->str, show, status, NULL, "--",
|
||||
"offline");
|
||||
|
||||
if (prefs_get_boolean(PREF_STATUSES)) {
|
||||
_show_status_string(console, display_str->str, show, status, NULL, "--",
|
||||
ProfWin *window = wins_get_by_recipient(jidp->barejid);
|
||||
if (window != NULL) {
|
||||
_show_status_string(window, display_str->str, show, status, NULL, "--",
|
||||
"offline");
|
||||
if (window != NULL) {
|
||||
_show_status_string(window, display_str->str, show, status, NULL, "--",
|
||||
"offline");
|
||||
}
|
||||
}
|
||||
|
||||
jid_destroy(jidp);
|
||||
@@ -926,9 +922,7 @@ ui_new_chat_win(const char * const to)
|
||||
if (strcmp(p_contact_presence(contact), "offline") == 0) {
|
||||
const char const *show = p_contact_presence(contact);
|
||||
const char const *status = p_contact_status(contact);
|
||||
if (prefs_get_boolean(PREF_STATUSES)) {
|
||||
_show_status_string(window, to, show, status, NULL, "--", "offline");
|
||||
}
|
||||
_show_status_string(window, to, show, status, NULL, "--", "offline");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1036,9 +1030,7 @@ ui_outgoing_msg(const char * const from, const char * const to,
|
||||
if (strcmp(p_contact_presence(contact), "offline") == 0) {
|
||||
const char const *show = p_contact_presence(contact);
|
||||
const char const *status = p_contact_status(contact);
|
||||
if (prefs_get_boolean(PREF_STATUSES)) {
|
||||
_show_status_string(window, to, show, status, NULL, "--", "offline");
|
||||
}
|
||||
_show_status_string(window, to, show, status, NULL, "--", "offline");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1169,9 +1161,7 @@ ui_room_member_presence(const char * const room, const char * const nick,
|
||||
ProfWin *window = wins_get_by_recipient(room);
|
||||
|
||||
if (window != NULL) {
|
||||
if (prefs_get_boolean(PREF_STATUSES)) {
|
||||
_show_status_string(window, nick, show, status, NULL, "++", "online");
|
||||
}
|
||||
_show_status_string(window, nick, show, status, NULL, "++", "online");
|
||||
}
|
||||
|
||||
if (wins_is_current(window)) {
|
||||
|
||||
Reference in New Issue
Block a user