aboutsummaryrefslogtreecommitdiff
path: root/src/espik_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/espik_config.c')
-rw-r--r--src/espik_config.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/espik_config.c b/src/espik_config.c
index f3e9668..e0a3b87 100644
--- a/src/espik_config.c
+++ b/src/espik_config.c
@@ -10,7 +10,7 @@
#include "espik_config.h"
#include "espik_error.h"
-t_servinfo *espik_server_config_set (char *server, unsigned short port)
+t_servinfo* espik_server_config_set (char *server, unsigned short port)
{
t_servinfo *s_info;
@@ -49,9 +49,12 @@ void espik_config_default_set ()
user_sysinfo = espik_user_sysinfo_get ();
- ecore_config_string_default ("/config/user/nickname", user_sysinfo->nickname);
- ecore_config_string_default ("/config/user/username", user_sysinfo->username);
- ecore_config_string_default ("/config/user/realname", user_sysinfo->realname);
+ ecore_config_string_default ("/config/user/nickname",
+ user_sysinfo->nickname);
+ ecore_config_string_default ("/config/user/username",
+ user_sysinfo->username);
+ ecore_config_string_default ("/config/user/realname",
+ user_sysinfo->realname);
ecore_config_string_default ("/espik/version", ESPIK_VERSION);
@@ -79,11 +82,15 @@ void espik_config_get (t_info * s_info)
espik_config_default_set ();
s_info->server->host = ecore_config_string_get ("/config/server/0/host");
- s_info->server->port = (unsigned short)ecore_config_int_get ("/config/server/0/port");
-
- s_info->client->nickname = ecore_config_string_get ("/config/user/nickname");
- s_info->client->username = ecore_config_string_get ("/config/user/username");
- s_info->client->realname = ecore_config_string_get ("/config/user/realname");
+ s_info->server->port
+ = (unsigned short)ecore_config_int_get ("/config/server/0/port");
+
+ s_info->client->nickname
+ = ecore_config_string_get ("/config/user/nickname");
+ s_info->client->username
+ = ecore_config_string_get ("/config/user/username");
+ s_info->client->realname
+ = ecore_config_string_get ("/config/user/realname");
ecore_config_save ();
}