comparison 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
comparison
equal deleted inserted replaced
2120:8aa5e80aebce 2121:9c791e2a437a
2937 // If arg is "-", let's clear the topic 2937 // If arg is "-", let's clear the topic
2938 if (!strcmp(arg, "-")) 2938 if (!strcmp(arg, "-"))
2939 arg = NULL; 2939 arg = NULL;
2940 2940
2941 arg = to_utf8(arg); 2941 arg = to_utf8(arg);
2942 // if arg is not NULL & option is set, unescape it
2943 if (arg && settings_opt_get_int("unescape_topic")) {
2944 gchar *tmp;
2945 tmp = g_strcompress(arg);
2946 g_free(arg);
2947 arg = tmp;
2948 }
2949
2942 // Set the topic 2950 // Set the topic
2943 xmpp_send_msg(buddy_getjid(bud), NULL, ROSTER_TYPE_ROOM, arg ? arg : "", 2951 xmpp_send_msg(buddy_getjid(bud), NULL, ROSTER_TYPE_ROOM, arg ? arg : "",
2944 FALSE, NULL, LM_MESSAGE_SUB_TYPE_NOT_SET, NULL); 2952 FALSE, NULL, LM_MESSAGE_SUB_TYPE_NOT_SET, NULL);
2945 g_free(arg); 2953 g_free(arg);
2946 } 2954 }