summary refs log tree commit diff stats
path: root/src/common/hexchat.c
diff options
context:
space:
mode:
authorbviktor <bviktor@outlook.com>2012-11-03 21:48:56 -0700
committerbviktor <bviktor@outlook.com>2012-11-03 21:48:56 -0700
commit3c5284f19de644e010d0dfe85d179fb5633c92fb (patch)
treecfcfb0f27d78dd65bb657f0e0caeabb42737cc03 /src/common/hexchat.c
parente0b1724158d44370d34d108a5f07fe0b36e4e254 (diff)
parentc2c23894fc4e376ff10c9c3cbcfa5c350c1e3073 (diff)
Merge pull request #224 from Arnavion/utf8-everywhere
UTF-8 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 *