| 440 strcat(buf, "[detached] "); |
440 strcat(buf, "[detached] "); |
| 441 if (mode & SILC_UMODE_REJECT_WATCHING) |
441 if (mode & SILC_UMODE_REJECT_WATCHING) |
| 442 strcat(buf, "[rejects watching] "); |
442 strcat(buf, "[rejects watching] "); |
| 443 if (mode & SILC_UMODE_BLOCK_INVITE) |
443 if (mode & SILC_UMODE_BLOCK_INVITE) |
| 444 strcat(buf, "[blocks invites] "); |
444 strcat(buf, "[blocks invites] "); |
| |
445 g_strchomp(buf); |
| 445 } |
446 } |
| 446 |
447 |
| 447 void silcpurple_get_chmode_string(SilcUInt32 mode, char *buf, |
448 void silcpurple_get_chmode_string(SilcUInt32 mode, char *buf, |
| 448 SilcUInt32 buf_size) |
449 SilcUInt32 buf_size) |
| 449 { |
450 { |
| 468 strcat(buf, "[public key auth] "); |
469 strcat(buf, "[public key auth] "); |
| 469 if (mode & SILC_CHANNEL_MODE_SILENCE_USERS) |
470 if (mode & SILC_CHANNEL_MODE_SILENCE_USERS) |
| 470 strcat(buf, "[users silenced] "); |
471 strcat(buf, "[users silenced] "); |
| 471 if (mode & SILC_CHANNEL_MODE_SILENCE_OPERS) |
472 if (mode & SILC_CHANNEL_MODE_SILENCE_OPERS) |
| 472 strcat(buf, "[operators silenced] "); |
473 strcat(buf, "[operators silenced] "); |
| |
474 g_strchomp(buf); |
| 473 } |
475 } |
| 474 |
476 |
| 475 void silcpurple_get_chumode_string(SilcUInt32 mode, char *buf, |
477 void silcpurple_get_chumode_string(SilcUInt32 mode, char *buf, |
| 476 SilcUInt32 buf_size) |
478 SilcUInt32 buf_size) |
| 477 { |
479 { |
| 486 strcat(buf, "[blocks user messages] "); |
488 strcat(buf, "[blocks user messages] "); |
| 487 if (mode & SILC_CHANNEL_UMODE_BLOCK_MESSAGES_ROBOTS) |
489 if (mode & SILC_CHANNEL_UMODE_BLOCK_MESSAGES_ROBOTS) |
| 488 strcat(buf, "[blocks robot messages] "); |
490 strcat(buf, "[blocks robot messages] "); |
| 489 if (mode & SILC_CHANNEL_UMODE_QUIET) |
491 if (mode & SILC_CHANNEL_UMODE_QUIET) |
| 490 strcat(buf, "[quieted] "); |
492 strcat(buf, "[quieted] "); |
| |
493 g_strchomp(buf); |
| 491 } |
494 } |
| 492 |
495 |
| 493 void |
496 void |
| 494 silcpurple_parse_attrs(SilcDList attrs, char **moodstr, char **statusstr, |
497 silcpurple_parse_attrs(SilcDList attrs, char **moodstr, char **statusstr, |
| 495 char **contactstr, char **langstr, char **devicestr, |
498 char **contactstr, char **langstr, char **devicestr, |
| 542 g_string_append_printf(s, "[%s] ", _("Anxious")); |
545 g_string_append_printf(s, "[%s] ", _("Anxious")); |
| 543 } |
546 } |
| 544 if (strlen(s->str)) { |
547 if (strlen(s->str)) { |
| 545 *moodstr = s->str; |
548 *moodstr = s->str; |
| 546 g_string_free(s, FALSE); |
549 g_string_free(s, FALSE); |
| |
550 g_strchomp(*moodstr); |
| 547 } else |
551 } else |
| 548 g_string_free(s, TRUE); |
552 g_string_free(s, TRUE); |
| 549 |
553 |
| 550 attr = silcpurple_get_attr(attrs, SILC_ATTRIBUTE_STATUS_FREETEXT); |
554 attr = silcpurple_get_attr(attrs, SILC_ATTRIBUTE_STATUS_FREETEXT); |
| 551 memset(tmp, 0, sizeof(tmp)); |
555 memset(tmp, 0, sizeof(tmp)); |
| 571 g_string_append_printf(s, "[%s] ", _("Video Conferencing")); |
575 g_string_append_printf(s, "[%s] ", _("Video Conferencing")); |
| 572 } |
576 } |
| 573 if (strlen(s->str)) { |
577 if (strlen(s->str)) { |
| 574 *contactstr = s->str; |
578 *contactstr = s->str; |
| 575 g_string_free(s, FALSE); |
579 g_string_free(s, FALSE); |
| |
580 g_strchomp(*contactstr); |
| 576 } else |
581 } else |
| 577 g_string_free(s, TRUE); |
582 g_string_free(s, TRUE); |
| 578 |
583 |
| 579 attr = silcpurple_get_attr(attrs, SILC_ATTRIBUTE_PREFERRED_LANGUAGE); |
584 attr = silcpurple_get_attr(attrs, SILC_ATTRIBUTE_PREFERRED_LANGUAGE); |
| 580 memset(tmp, 0, sizeof(tmp)); |
585 memset(tmp, 0, sizeof(tmp)); |