Mercurial > pidgin
diff src/server.c @ 9594:15d09e546cee
[gaim-migrate @ 10437]
I changed the 2 preferences dealing with auto-responses.
It's a drop down box. Check it out.
I also made Gaim not load .gaimrc
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Sun, 25 Jul 2004 22:13:03 +0000 |
| parents | fe35f55ee984 |
| children | 1b13160bf5a4 |
line wrap: on
line diff
--- a/src/server.c Sun Jul 25 17:52:22 2004 +0000 +++ b/src/server.c Sun Jul 25 22:13:03 2004 +0000 @@ -260,6 +260,7 @@ GaimConversation *c; int val = -EINVAL; GaimPluginProtocolInfo *prpl_info = NULL; + const gchar *auto_reply_pref; if (gc != NULL && gc->prpl != NULL) prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); @@ -272,8 +273,13 @@ if (!(imflags & GAIM_CONV_IM_AUTO_RESP)) serv_touch_idle(gc); + /* + * XXX - If "only auto-reply when away & idle" is set, then shouldn't + * this only reset lar->sent if we're away AND idle? + */ + auto_reply_pref = gaim_prefs_get_string("/core/away/auto_reply"); if (gc->away && (gc->flags & GAIM_CONNECTION_AUTO_RESP) && - gaim_prefs_get_bool("/core/away/auto_response/enabled")) { + strcmp(auto_reply_pref, "never")) { struct last_auto_response *lar; lar = get_last_auto_response(gc, name); @@ -897,6 +903,7 @@ const char *alias = b ? gaim_get_buddy_alias(b) : name; int row; struct last_auto_response *lar; + const gchar *auto_reply_pref; /* * Either we're going to queue it or not. Because of the way @@ -972,16 +979,17 @@ * Don't autorespond if: * * - it's not supported on this connection + * - or the away message is empty * - or it's disabled - * - or the away message is empty * - or we're not idle and the 'only auto respond if idle' pref * is set */ + auto_reply_pref = gaim_prefs_get_string("/core/away/auto_reply"); if (!(gc->flags & GAIM_CONNECTION_AUTO_RESP) || - !gaim_prefs_get_bool("/core/away/auto_response/enabled") || *gc->away == '\0' || + !strcmp(auto_reply_pref, "never") || (!gc->is_idle && - gaim_prefs_get_bool("/core/away/auto_response/idle_only"))) { + !strcmp(auto_reply_pref, "awayidle"))) { g_free(name); g_free(message);
