Changeset 3314ced
- Timestamp:
- 2015-10-21T11:40:58Z (9 years ago)
- Branches:
- master
- Children:
- 12f041d
- Parents:
- 09f7ec1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r09f7ec1 r3314ced 200 200 } 201 201 202 static void jabber_xmlconsole_enable(struct im_connection *ic) 203 { 204 struct jabber_data *jd = ic->proto_data; 205 const char *handle = JABBER_XMLCONSOLE_HANDLE; 206 bee_user_t *bu; 207 208 jd->flags |= JFLAG_XMLCONSOLE; 209 210 if (!(bu = bee_user_by_handle(ic->bee, ic, handle))) { 211 bu = bee_user_new(ic->bee, ic, handle, 0); 212 bu->flags |= BEE_USER_NOOTR; 213 } 214 } 215 202 216 /* Separate this from jabber_login() so we can do OAuth first if necessary. 203 217 Putting this in io.c would probably be more correct. */ … … 266 280 267 281 if (set_getbool(&acc->set, "xmlconsole")) { 268 jd->flags |= JFLAG_XMLCONSOLE; 269 /* Shouldn't really do this at this stage already, maybe. But 270 I think this shouldn't break anything. */ 271 imcb_add_buddy(ic, JABBER_XMLCONSOLE_HANDLE, NULL); 282 jabber_xmlconsole_enable(ic); 272 283 } 273 284 … … 474 485 static void jabber_add_buddy(struct im_connection *ic, char *who, char *group) 475 486 { 476 struct jabber_data *jd = ic->proto_data;477 478 487 if (g_strcasecmp(who, JABBER_XMLCONSOLE_HANDLE) == 0) { 479 jd->flags |= JFLAG_XMLCONSOLE; 480 imcb_add_buddy(ic, JABBER_XMLCONSOLE_HANDLE, NULL); 488 jabber_xmlconsole_enable(ic); 481 489 return; 482 490 }
Note: See TracChangeset
for help on using the changeset viewer.