comparison mcabber/src/settings.c @ 1004:b57a01ffeed6

Use existing conference bookmarks Add support for XEP-0048 (Bookmark Storage). The bookmarks are retrieved when we connect and the conference bookmarks are used.
author Mikael Berthe <mikael@lilotux.net>
date Wed, 08 Nov 2006 22:26:27 +0100
parents 303408ef5e5d
children 230dca34dbea
comparison
equal deleted inserted replaced
1003:c8b1a52b2fd6 1004:b57a01ffeed6
343 setting = ptr->data; 343 setting = ptr->data;
344 pfunc(param, setting->name, setting->value); 344 pfunc(param, setting->name, setting->value);
345 } 345 }
346 } 346 }
347 347
348
349 // default_muc_nickname()
350 // Return the user's default nickname
351 // The caller should free the string after use
352 char *default_muc_nickname(void)
353 {
354 char *nick;
355
356 // We try the "nickname" option, then the username part of the jid.
357 nick = (char*)settings_opt_get("nickname");
358 if (nick)
359 return g_strdup(nick);
360
361 nick = g_strdup(settings_opt_get("username"));
362 if (nick) {
363 char *p = strchr(nick, JID_DOMAIN_SEPARATOR);
364 if (p > nick)
365 *p = 0;
366 }
367 return nick;
368 }
369
348 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ 370 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */