# HG changeset patch # User sh!zeeg # Date 1400001502 -14400 # Node ID 9c791e2a437a2588bce14153e96aaee90e2e2318 # Parent 8aa5e80aebcea5e7848ddf4a32487d54e0656e1b add option 'unescape_topic' diff -r 8aa5e80aebce -r 9c791e2a437a mcabber/mcabber/commands.c --- 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); diff -r 8aa5e80aebce -r 9c791e2a437a mcabber/mcabberrc.example --- a/mcabber/mcabberrc.example Tue May 13 20:24:51 2014 +0400 +++ b/mcabber/mcabberrc.example Tue May 13 21:18:22 2014 +0400 @@ -497,6 +497,12 @@ # Values: 0: disable (default) 1: enable #set show_room_occupants_count = 0 # +# To enable C-escape sequences support in /room topic +# set 'unescape_topic' to 1 +# \n - new line` +# \t - tab character +#set unescape_topic = 0 +# # Set 'log_display_sender' to 1 to display the message sender's JID in the # log window (default: 0, no) #set log_display_sender = 0