Mercurial > pidgin
diff src/server.c @ 8948:175cbf710a47
[gaim-migrate @ 9720]
Eradicate the "seconds before resending autoresponse" preference
(default to 600 seconds) and the "send autoresponse in active
conversations" preference (default to no)
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 16 May 2004 06:39:51 +0000 |
parents | 9a25d7f66d9c |
children | 80b4c956d7ae |
line wrap: on
line diff
--- a/src/server.c Sun May 16 06:12:03 2004 +0000 +++ b/src/server.c Sun May 16 06:39:51 2004 +0000 @@ -40,6 +40,8 @@ #include "gtkutils.h" #include "ui.h" +#define SECS_BEFORE_RESENDING_AUTORESPONSE 600 + void serv_login(GaimAccount *account) { GaimPlugin *p = gaim_find_prpl(gaim_account_get_protocol_id(account)); @@ -201,9 +203,7 @@ tmp = tmp->next; lar = (struct last_auto_response *)cur->data; - if ((time(NULL) - lar->sent) > - gaim_prefs_get_int("/core/away/auto_response/sec_before_resend")) { - + if ((time(NULL) - lar->sent) > SECS_BEFORE_RESENDING_AUTORESPONSE) { last_auto_responses = g_slist_remove(last_auto_responses, lar); g_free(lar); } @@ -219,8 +219,7 @@ /* because we're modifying or creating a lar, schedule the * function to expire them as the pref dictates */ - gaim_timeout_add((gaim_prefs_get_int("/core/away/auto_response/sec_before_resend") + 1) * 1000, - expire_last_auto_responses, NULL); + gaim_timeout_add((SECS_BEFORE_RESENDING_AUTORESPONSE + 1) * 1000, expire_last_auto_responses, NULL); tmp = last_auto_responses; @@ -279,10 +278,8 @@ if (!(imflags & GAIM_CONV_IM_AUTO_RESP)) serv_touch_idle(gc); - if (gc->away && - (gc->flags & GAIM_CONNECTION_AUTO_RESP) && - gaim_prefs_get_bool("/core/away/auto_response/enabled") && - !gaim_prefs_get_bool("/core/away/auto_response/in_active_conv")) { + if (gc->away && (gc->flags & GAIM_CONNECTION_AUTO_RESP) && + gaim_prefs_get_bool("/core/away/auto_response/enabled")) { struct last_auto_response *lar; lar = get_last_auto_response(gc, name); @@ -1018,9 +1015,7 @@ * if necessary. */ lar = get_last_auto_response(gc, name); - if ((t - lar->sent) < - gaim_prefs_get_int("/core/away/auto_response/sec_before_resend")) { - + if ((t - lar->sent) < SECS_BEFORE_RESENDING_AUTORESPONSE) { g_free(name); g_free(message); return;