aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeber <beber>2005-12-02 17:39:53 +0000
committerbeber <beber>2005-12-02 17:39:53 +0000
commit4c4b505bee896cf701f4e678f88579d918affe72 (patch)
tree72a0ac5b189b5229ab822df2760b1db646d151e9 /src
parenttypo (diff)
downloadespik-4c4b505bee896cf701f4e678f88579d918affe72.tar.xz
Use good nick
Diffstat (limited to 'src')
-rw-r--r--src/espik.c5
-rw-r--r--src/espik_config.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/espik.c b/src/espik.c
index 5b97ddf..beba783 100644
--- a/src/espik.c
+++ b/src/espik.c
@@ -107,6 +107,11 @@ int main (int argc, char **argv)
/* Init IRC connection */
printf ("<<<<<<<< DUMMMMY CODE >>>>>>>\n");
+
+ char *tmp, *tmp2;
+
+ sprintf (tmp, "NICK %s", a_infos.client->nickname);
+ sprintf (tmp2, "USER %s %s localhost: %s", a_infos.client->nickname, a_infos.client->nickname, a_infos.client->realname);
espik_raw_send ("NICK espik");
espik_raw_send ("USER beber beber guybrush.melee :Ronnie Reagan");
diff --git a/src/espik_config.c b/src/espik_config.c
index 7e74e16..82371eb 100644
--- a/src/espik_config.c
+++ b/src/espik_config.c
@@ -69,6 +69,9 @@ void espik_config_init ()
kill_me (2);
/* exit (ret); */
}
+
+ /* If an config option is not present, this will force it to a value */
+ espik_config_default_set ();
if ((ret = ecore_config_load ()) != ECORE_CONFIG_ERR_SUCC)
{
@@ -83,9 +86,6 @@ void espik_config_get (t_info *s_info)
s_info->server = malloc (sizeof (t_servinfo));
s_info->client = malloc (sizeof (t_userinfo));
- /* If an config option is not present, this will force it to a value */
- 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");