comparison mcabber/src/settings.c @ 1611:f9bf561e54d0

Use the username for authentication, added jid_get_username() to utils.c
author franky
date Sun, 11 Oct 2009 20:58:20 +0200
parents 14690e624e9d
children fca9a4c17432
comparison
equal deleted inserted replaced
1610:6db9f403f707 1611:f9bf561e54d0
407 // We try the "nickname" option, then the username part of the jid. 407 // We try the "nickname" option, then the username part of the jid.
408 nick = (char*)settings_opt_get("nickname"); 408 nick = (char*)settings_opt_get("nickname");
409 if (nick) 409 if (nick)
410 return g_strdup(nick); 410 return g_strdup(nick);
411 411
412 nick = g_strdup(settings_opt_get("username")); 412 nick = jid_get_username(settings_opt_get("jid"));
413 if (nick) {
414 char *p = strchr(nick, JID_DOMAIN_SEPARATOR);
415 if (p > nick)
416 *p = 0;
417 }
418 return nick; 413 return nick;
419 } 414 }
420 415
421 416
422 /* PGP settings */ 417 /* PGP settings */