summary refs log tree commit diff stats
path: root/src/common/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/text.c')
-rw-r--r--src/common/text.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/text.c b/src/common/text.c
index e0cdb5ee..d18b9c1a 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -518,7 +518,11 @@ log_create_pathname (char *servname, char *channame, char *netname)
 
 	if (!netname)
 	{
-		netname = "NETWORK";
+		netname = strdup ("NETWORK");
+	}
+	else
+	{
+		netname = log_create_filename (netname);
 	}
 
 	/* first, everything is in UTF-8 */
@@ -533,6 +537,7 @@ log_create_pathname (char *servname, char *channame, char *netname)
 
 	log_insert_vars (fname, sizeof (fname), prefs.hex_irc_logmask, channame, netname, servname);
 	free (channame);
+	free (netname);
 
 	/* insert time/date */
 	now = time (NULL);