Mercurial > hg
comparison mcabber/src/settings.c @ 1395:d431cd75eb53
Use bookmarked nickname when manually joining a room
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 10 Dec 2007 21:45:24 +0100 |
parents | d9606bd03144 |
children | 366ef500c522 |
comparison
equal
deleted
inserted
replaced
1394:bba74a50dedf | 1395:d431cd75eb53 |
---|---|
386 | 386 |
387 | 387 |
388 // default_muc_nickname() | 388 // default_muc_nickname() |
389 // Return the user's default nickname | 389 // Return the user's default nickname |
390 // The caller should free the string after use | 390 // The caller should free the string after use |
391 char *default_muc_nickname(void) | 391 char *default_muc_nickname(const char *roomid) |
392 { | 392 { |
393 char *nick; | 393 char *nick; |
394 | |
395 nick = (char*)jb_get_bookmark_nick(roomid); | |
396 if (nick) | |
397 return g_strdup(nick); | |
394 | 398 |
395 // We try the "nickname" option, then the username part of the jid. | 399 // We try the "nickname" option, then the username part of the jid. |
396 nick = (char*)settings_opt_get("nickname"); | 400 nick = (char*)settings_opt_get("nickname"); |
397 if (nick) | 401 if (nick) |
398 return g_strdup(nick); | 402 return g_strdup(nick); |