Changeset 291c49b


Ignore:
Timestamp:
2015-04-13T22:21:06Z (5 years ago)
Author:
dequis <dx@…>
Children:
356e2dd
Parents:
1aacef41
Message:

Set hipchat server with set_setstr so set_eval_account gets called

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r1aacef41 r291c49b  
    5656static void jabber_init(account_t *acc)
    5757{
    58         char *default_server = NULL;
    5958        set_t *s;
    6059        char str[16];
    61 
    62         if (strcmp(acc->prpl->name, "hipchat") == 0) {
    63                 default_server = "chat.hipchat.com";
    64         } else {
    65                 s = set_add(&acc->set, "oauth", "false", set_eval_oauth, acc);
    66         }
    6760
    6861        s = set_add(&acc->set, "activity_timeout", "600", set_eval_int, acc);
     
    8679        s->flags |= ACC_SET_OFFLINE_ONLY | SET_HIDDEN_DEFAULT;
    8780
    88         s = set_add(&acc->set, "server", default_server, set_eval_account, acc);
     81        s = set_add(&acc->set, "server", NULL, set_eval_account, acc);
    8982        s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
     83
     84        if (strcmp(acc->prpl->name, "hipchat") == 0) {
     85                set_setstr(&acc->set, "server", "chat.hipchat.com");
     86        } else {
     87                s = set_add(&acc->set, "oauth", "false", set_eval_oauth, acc);
     88        }
    9089
    9190        s = set_add(&acc->set, "ssl", "false", set_eval_bool, acc);
Note: See TracChangeset for help on using the changeset viewer.