Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/commands.c @ 2121:9c791e2a437a
add option 'unescape_topic'
author | sh!zeeg <shizeeque@gmail.com> |
---|---|
date | Tue, 13 May 2014 21:18:22 +0400 |
parents | 8aa5e80aebce |
children | b41719d57dac |
line wrap: on
line diff
--- a/mcabber/mcabber/commands.c Tue May 13 20:24:51 2014 +0400 +++ b/mcabber/mcabber/commands.c Tue May 13 21:18:22 2014 +0400 @@ -2939,6 +2939,14 @@ arg = NULL; arg = to_utf8(arg); + // if arg is not NULL & option is set, unescape it + if (arg && settings_opt_get_int("unescape_topic")) { + gchar *tmp; + tmp = g_strcompress(arg); + g_free(arg); + arg = tmp; + } + // Set the topic xmpp_send_msg(buddy_getjid(bud), NULL, ROSTER_TYPE_ROOM, arg ? arg : "", FALSE, NULL, LM_MESSAGE_SUB_TYPE_NOT_SET, NULL);