Moved functions to xmpp_presence

This commit is contained in:
James Booth
2013-01-28 22:55:26 +00:00
parent 7255ef5e1c
commit bfe1d76e5f
6 changed files with 193 additions and 158 deletions

View File

@@ -469,7 +469,7 @@ _handle_idle_time()
// handle away mode
if (strcmp(prefs_get_autoaway_mode(), "away") == 0) {
jabber_update_presence(PRESENCE_AWAY, prefs_get_autoaway_message(), 0);
presence_update(PRESENCE_AWAY, prefs_get_autoaway_message(), 0);
if (prefs_get_autoaway_message() != NULL) {
cons_show("Idle for %d minutes, status set to away, \"%s\".",
prefs_get_autoaway_time(), prefs_get_autoaway_message());
@@ -484,7 +484,7 @@ _handle_idle_time()
// handle idle mode
} else if (strcmp(prefs_get_autoaway_mode(), "idle") == 0) {
jabber_update_presence(PRESENCE_ONLINE,
presence_update(PRESENCE_ONLINE,
prefs_get_autoaway_message(), idle_ms / 1000);
}
}
@@ -496,12 +496,12 @@ _handle_idle_time()
// handle check
if (prefs_get_autoaway_check()) {
if (strcmp(prefs_get_autoaway_mode(), "away") == 0) {
jabber_update_presence(PRESENCE_ONLINE, NULL, 0);
presence_update(PRESENCE_ONLINE, NULL, 0);
cons_show("No longer idle, status set to online.");
title_bar_set_status(PRESENCE_ONLINE);
win_current_page_off();
} else if (strcmp(prefs_get_autoaway_mode(), "idle") == 0) {
jabber_update_presence(PRESENCE_ONLINE, NULL, 0);
presence_update(PRESENCE_ONLINE, NULL, 0);
title_bar_set_status(PRESENCE_ONLINE);
}
}