summary refs log tree commit diff stats
path: root/src/common/hexchat.c
diff options
context:
space:
mode:
authorleeter <leeterfp@gmail.com>2014-12-10 14:40:42 -0500
committerTingPing <tingping@tingping.se>2014-12-10 14:40:42 -0500
commit6aafc8e51d17f0bd92f1ec46567a5b1597e7e799 (patch)
tree3159bc195bef1878bd06932f6b38c427dc946305 /src/common/hexchat.c
parent10246f121a9dfb1fe38012aa92324ac6050822a2 (diff)
Fix chanopts not saving if /quit before exit
This is the C fix, unfortunately a proper fix, e.g.
 removing the dependency on session_name all together is a much vaster
 refactor outside the scope of this bugfix.

Closes #1111
Diffstat (limited to 'src/common/hexchat.c')
-rw-r--r--src/common/hexchat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index 30e95ca9..274773e7 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -480,7 +480,10 @@ session_new (server *serv, char *from, int type, int focus)
 	sess->lastact_idx = LACT_NONE;
 
 	if (from != NULL)
-		safe_strcpy (sess->channel, from, CHANLEN);
+	{
+		safe_strcpy(sess->channel, from, CHANLEN);
+		safe_strcpy(sess->session_name, from, CHANLEN);
+	}
 
 	sess_list = g_slist_prepend (sess_list, sess);