summary refs log tree commit diff stats
path: root/src/common/hexchat.c
diff options
context:
space:
mode:
authorArnavion <arnavion@gmail.com>2012-11-03 10:24:25 -0700
committerArnavion <arnavion@gmail.com>2012-11-03 19:04:02 -0700
commit5d9264aff6d7bcdd2f0595bfdf2a3a7a23330d46 (patch)
tree17765368da40d67405ec22c0e1d608f706fbe055 /src/common/hexchat.c
parente0b1724158d44370d34d108a5f07fe0b36e4e254 (diff)
Initial commit for utf8 everywhere.
Diffstat (limited to 'src/common/hexchat.c')
-rw-r--r--src/common/hexchat.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index d8207fb0..ea564a54 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -303,7 +303,7 @@ static void
 irc_init (session *sess)
 {
 	static int done_init = FALSE;
-	char buf[512];
+	char *buf;
 
 	if (done_init)
 		return;
@@ -330,9 +330,10 @@ irc_init (session *sess)
 
 	if (arg_url != NULL)
 	{
-		snprintf (buf, sizeof (buf), "server %s", arg_url);
-		handle_command (sess, buf, FALSE);
+		buf = g_strdup_printf ("server %s", arg_url);
 		g_free (arg_url);	/* from GOption */
+		handle_command (sess, buf, FALSE);
+		g_free (buf);
 	}
 
 	if (arg_command != NULL)
@@ -340,9 +341,10 @@ irc_init (session *sess)
 		g_free (arg_command);
 	}
 
-	/* load -e ~/.xchat2/startup.txt */
-	snprintf (buf, sizeof (buf), "%s/%s", get_xdir_fs (), "startup.txt");
+	/* load -e <xdir>/startup.txt */
+	buf = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "startup.txt", get_xdir ());
 	load_perform_file (sess, buf);
+	g_free (buf);
 }
 
 static session *