Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp_muc.c @ 2346:7921c8d671c8
Implemented another helper function jid_get_resource_name
author | franky |
---|---|
date | Tue, 14 May 2019 22:19:33 +0200 |
parents | ffd0e57e9563 |
children | db8de1b464d3 |
comparison
equal
deleted
inserted
replaced
2345:462f4359391c | 2346:7921c8d671c8 |
---|---|
373 char *tmp = NULL; | 373 char *tmp = NULL; |
374 int printjid; | 374 int printjid; |
375 | 375 |
376 printjid = settings_opt_get_int("muc_print_jid"); | 376 printjid = settings_opt_get_int("muc_print_jid"); |
377 if (mbjid && autowhois == autowhois_off && printjid) { | 377 if (mbjid && autowhois == autowhois_off && printjid) { |
378 if (printjid == 1) | 378 if (printjid == 1) // print nick + barejid |
379 tmp = strchr(mbjid, JID_RESOURCE_SEPARATOR); | 379 tmp = jidtodisp(mbjid); |
380 if (tmp) *tmp = '\0'; | 380 if (printjid == 2) // print nick + full jid |
381 nickjid = g_strdup_printf("%s <%s>", rname, mbjid); | 381 tmp = g_strdup(mbjid); |
382 if (tmp) *tmp = JID_RESOURCE_SEPARATOR; | 382 nickjid = g_strdup_printf("%s <%s>", rname, tmp); |
383 g_free(tmp); | |
383 } else { | 384 } else { |
384 nickjid = g_strdup(rname); | 385 nickjid = g_strdup(rname); |
385 } | 386 } |
386 | 387 |
387 if (!buddy_getinsideroom(room_elt->data)) { | 388 if (!buddy_getinsideroom(room_elt->data)) { |