diff --git a/src/chat/misc.c b/src/chat/misc.c
index 448ee28..f4c36f1 100644
--- a/src/chat/misc.c
+++ b/src/chat/misc.c
@@ -30,7 +30,6 @@ along with this program. If not, see .
#include
#include
-#include
#include
#include
@@ -305,7 +304,7 @@ void *why2_communicate_thread(void *arg)
//GET USERNAME
char *string_buffer = why2_replace(WHY2_CHAT_CONFIG_DIR "/" WHY2_CHAT_CONFIG_SERVER, "{USER}", getenv("USER"));
- char *config_username = why2_yml_read(string_buffer, "user_pick_username");
+ char *config_username = why2_config_read(string_buffer, "user_pick_username");
if (config_username == NULL || strcmp(config_username, "true") == 0)
{
@@ -318,7 +317,7 @@ void *why2_communicate_thread(void *arg)
}
why2_deallocate(string_buffer);
- why2_deallocate(config_username);
+ why2_config_read_free(config_username);
void *buffer;
char *received = NULL;