comparison pidgin/gtkaccount.c @ 18037:e3e42a99070e

jabber can contain @ symbols and / in the resource, so we have to look for the split characters from the beginning of the username I'm not particularly happy with the name 'reverse' for this, but I'm not feeling creative enough at the moment to come up with something better. If someone comes up with something better before 2.1.0, feel free to change it.
author Nathan Walp <nwalp@pidgin.im>
date Mon, 04 Jun 2007 04:37:07 +0000
parents 2a6fb7c6d030
children 678d78b7fa34
comparison
equal deleted inserted replaced
18036:ee9f7ee0be66 18037:e3e42a99070e
481 PurpleAccountUserSplit *split = l2->data; 481 PurpleAccountUserSplit *split = l2->data;
482 const char *value = NULL, *protocol = NULL; 482 const char *value = NULL, *protocol = NULL;
483 char *c; 483 char *c;
484 484
485 if (dialog->account != NULL) { 485 if (dialog->account != NULL) {
486 c = strrchr(username, 486 if(purple_account_user_split_get_reverse(split))
487 c = strrchr(username,
488 purple_account_user_split_get_separator(split));
489 else
490 c = strchr(username,
487 purple_account_user_split_get_separator(split)); 491 purple_account_user_split_get_separator(split));
488 492
489 if (c != NULL) { 493 if (c != NULL) {
490 *c = '\0'; 494 *c = '\0';
491 c++; 495 c++;