Ignore:
Timestamp:
2015-06-17T22:47:26Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
b441614
Parents:
d832164 (diff), 2f99f23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/master' into parson

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    rd832164 rb75671d  
    4646        s->flags |= ACC_SET_OFFLINE_ONLY;
    4747
    48         set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc);
     48        s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc);
     49        s->flags |= ACC_SET_OFFLINE_ONLY;
     50
     51        s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc);
     52        s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
    4953
    5054        acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE |
     
    8286        msn_ns_connect(ic, server,
    8387                       set_getint(&ic->acc->set, "port"));
     88
     89        if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "mail_notifications_handle")) {
     90                imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL);
     91        }
    8492}
    8593
     
    144152{
    145153        struct bee_user *bu = bee_user_by_handle(ic->bee, ic, who);
    146 
    147 #ifdef DEBUG
    148         if (strcmp(who, "raw") == 0) {
    149                 msn_ns_write(ic, -1, "%s\r\n", message);
    150                 return 0;
    151         }
    152 #endif
    153 
    154         msn_ns_sendmessage(ic, bu, message);
    155         return(0);
     154        msn_ns_send_message(ic, bu, message);
     155        return 0;
    156156}
    157157
     
    277277                return 0;
    278278        } else if (typing & OPT_TYPING) {
    279                 return(msn_buddy_msg(ic, who, TYPING_NOTIFICATION_MESSAGE, 0));
     279                return msn_ns_send_typing(ic, bu);
    280280        } else {
    281281                return 1;
     
    338338
    339339        g_tree_remove(md->domaintree, bu->handle);
    340 }
    341 
    342 GList *msn_buddy_action_list(bee_user_t *bu)
    343 {
    344         static GList *ret = NULL;
    345 
    346         if (ret == NULL) {
    347                 static const struct buddy_action ba[2] = {
    348                         { "NUDGE", "Draw attention" },
    349                 };
    350 
    351                 ret = g_list_prepend(ret, (void *) ba + 0);
    352         }
    353 
    354         return ret;
    355 }
    356 
    357 void *msn_buddy_action(struct bee_user *bu, const char *action, char * const args[], void *data)
    358 {
    359         if (g_strcasecmp(action, "NUDGE") == 0) {
    360                 msn_buddy_msg(bu->ic, bu->handle, NUDGE_MESSAGE, 0);
    361         }
    362 
    363         return NULL;
    364340}
    365341
     
    392368        ret->buddy_data_add = msn_buddy_data_add;
    393369        ret->buddy_data_free = msn_buddy_data_free;
    394         ret->buddy_action_list = msn_buddy_action_list;
    395         ret->buddy_action = msn_buddy_action;
    396370
    397371        register_protocol(ret);
Note: See TracChangeset for help on using the changeset viewer.