Ticket #578: 0001-Oscar-add-an-ignore_add-setting-to-be-able-to-ignore.patch

File 0001-Oscar-add-an-ignore_add-setting-to-be-able-to-ignore.patch, 1.4 KB (added by vmiklos@…, at 2010-03-20T01:22:40Z)
  • protocols/oscar/oscar.c

    From 337518b1f422f70c64d535820fcda70e5b10c462 Mon Sep 17 00:00:00 2001
    From: Miklos Vajna <vmiklos@frugalware.org>
    Date: Sat, 20 Mar 2010 02:20:36 +0100
    Subject: [PATCH] Oscar: add an ignore_add setting to be able to ignore additions
    
    This sounds crazy for the first time, but given how much of us just use
    oscar these days without willing to add anyone - and seeing how much
    spam do we get via those irritating oscar requests, it makes sense.
    ---
     protocols/oscar/oscar.c |    9 ++++++++-
     1 files changed, 8 insertions(+), 1 deletions(-)
    
    diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
    index f0e65f9..9508b59 100644
    a b static void oscar_init(account_t *acc) 
    379379                s = set_add( &acc->set, "web_aware", "false", set_eval_bool, acc );
    380380                s->flags |= ACC_SET_OFFLINE_ONLY;
    381381        }
     382
     383        set_add(&acc->set, "ignore_add", "false", set_eval_bool, acc);
    382384       
    383385        acc->flags |= ACC_FLAG_AWAY_MESSAGE;
    384386}
    static void gaim_icq_authdeny(void *data_) { 
    12111213 * For when other people ask you for authorization
    12121214 */
    12131215static void gaim_icq_authask(struct im_connection *ic, guint32 uin, char *msg) {
    1214         struct icq_auth *data = g_new(struct icq_auth, 1);
     1216        struct icq_auth *data;
    12151217        char *reason = NULL;
    12161218        char *dialog_msg;
     1219
     1220        if (set_getbool(&ic->acc->set, "ignore_add"))
     1221                return;
    12171222       
     1223        data = g_new(struct icq_auth, 1);
     1224
    12181225        if (strlen(msg) > 6)
    12191226                reason = msg + 6;
    12201227