From 80348044c30830138e7ea19f9efa285fa87b11fd Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sun, 26 Jul 2009 18:22:53 +0200 Subject: [PATCH] Make sure history messages are not escaped. --- src/core/hub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/hub.c b/src/core/hub.c index 7d19ad6..168c883 100644 --- a/src/core/hub.c +++ b/src/core/hub.c @@ -207,7 +207,8 @@ int hub_handle_chat_message(struct hub_info* hub, struct hub_user* u, struct adc void hub_chat_history_add(struct hub_info* hub, struct hub_user* user, struct adc_message* cmd) { - char* message = adc_msg_get_argument(cmd, 0); + char* msg_esc = adc_msg_get_argument(cmd, 0); + char* message = adc_msg_unescape(msg_esc); char* log = hub_malloc(strlen(message) + strlen(user->id.nick) + 14); sprintf(log, "%s <%s> %s\n", get_timestamp(time(NULL)), user->id.nick, message); list_append(hub->chat_history, log); @@ -218,6 +219,7 @@ void hub_chat_history_add(struct hub_info* hub, struct hub_user* user, struct ad hub_free(msg); } hub_free(message); + hub_free(msg_esc); } void hub_chat_history_clear(struct hub_info* hub)