Make sure history messages are not escaped.

This commit is contained in:
Jan Vidar Krey 2009-07-26 18:22:53 +02:00
parent 31d4b0f0b1
commit 80348044c3
1 changed files with 3 additions and 1 deletions

View File

@ -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)