Changeset 9dc67f4
- Timestamp:
- 2015-04-05T21:44:15Z (10 years ago)
- Children:
- 71f87ba
- Parents:
- ac6855b3
- git-author:
- dequis <dx@…> (05-04-15 20:47:16)
- git-committer:
- dequis <dx@…> (05-04-15 21:44:15)
- Location:
- protocols/jabber
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
rac6855b3 r9dc67f4 56 56 static void jabber_init(account_t *acc) 57 57 { 58 char *default_server = NULL; 58 59 set_t *s; 59 60 char str[16]; 60 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 } 67 61 68 s = set_add(&acc->set, "activity_timeout", "600", set_eval_int, acc); 62 63 s = set_add(&acc->set, "oauth", "false", set_eval_oauth, acc);64 69 65 70 s = set_add(&acc->set, "display_name", NULL, NULL, acc); … … 81 86 s->flags |= ACC_SET_OFFLINE_ONLY | SET_HIDDEN_DEFAULT; 82 87 83 s = set_add(&acc->set, "server", NULL, set_eval_account, acc);88 s = set_add(&acc->set, "server", default_server, set_eval_account, acc); 84 89 s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK; 85 90 … … 121 126 122 127 jd->fd = jd->r_inpa = jd->w_inpa = -1; 128 129 if (strcmp(acc->prpl->name, "hipchat") == 0) { 130 jd->flags |= JFLAG_HIPCHAT; 131 } 123 132 124 133 if (jd->server == NULL) { … … 656 665 { 657 666 struct prpl *ret = g_new0(struct prpl, 1); 667 struct prpl *hipchat = NULL; 658 668 659 669 ret->name = "jabber"; … … 686 696 687 697 register_protocol(ret); 688 } 698 699 /* Another one for hipchat, which has completely different logins */ 700 hipchat = g_memdup(ret, sizeof(struct prpl)); 701 hipchat->name = "hipchat"; 702 register_protocol(hipchat); 703 } -
protocols/jabber/jabber.h
rac6855b3 r9dc67f4 48 48 49 49 JFLAG_GTALK = 0x100000, /* Is Google Talk, as confirmed by iq discovery */ 50 JFLAG_HIPCHAT = 0x200000, /* Is hipchat, because prpl->name says so */ 50 51 51 52 JFLAG_SASL_FB = 0x10000, /* Trying Facebook authentication. */
Note: See TracChangeset
for help on using the changeset viewer.