equal
deleted
inserted
replaced
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... */ |