# HG changeset patch # User Mark Doliner # Date 1137882792 0 # Node ID 880844bef520c7751c3f65ca93b87f8d0b0ed81d # Parent b7fd4315ab7960ef1af5eff5b7dea53a72a16acd [gaim-migrate @ 15334] Don't auto-reply when we're invisible, either committer: Tailor Script diff -r b7fd4315ab79 -r 880844bef520 src/server.c --- a/src/server.c Sat Jan 21 21:34:28 2006 +0000 +++ b/src/server.c Sat Jan 21 22:33:12 2006 +0000 @@ -432,8 +432,6 @@ { GaimAccount *account; GaimConversation *cnv; - GaimPresence *presence; - GaimStatus *status; char *message, *name; char *angel, *buffy; int plugin_return; @@ -448,8 +446,6 @@ return; } - presence = gaim_account_get_presence(account); - /* * We should update the conversation window buttons and menu, * if it exists. @@ -515,16 +511,24 @@ */ if (gc->flags & GAIM_CONNECTION_AUTO_RESP) { + GaimPresence *presence; + GaimStatus *status; + GaimStatusType *status_type; + GaimStatusPrimitive primitive; const gchar *auto_reply_pref; const char *away_msg = NULL; auto_reply_pref = gaim_prefs_get_string("/core/away/auto_reply"); + presence = gaim_account_get_presence(account); status = gaim_presence_get_active_status(presence); - if (gaim_status_is_available(status) || + status_type = gaim_status_get_type(status); + primitive = gaim_status_type_get_primitive(status_type); + if ((primitive == GAIM_STATUS_AVAILABLE) || + (primitive == GAIM_STATUS_INVISIBLE) || + (primitive == GAIM_STATUS_MOBILE) || !strcmp(auto_reply_pref, "never") || - (!gaim_presence_is_idle(presence) && - !strcmp(auto_reply_pref, "awayidle"))) + (!gaim_presence_is_idle(presence) && !strcmp(auto_reply_pref, "awayidle"))) { g_free(name); return;