summary refs log tree commit diff stats
path: root/src/common/server.c
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-03-11 02:15:42 -0500
committerPatrick Griffis <tingping@tingping.se>2016-03-11 02:15:42 -0500
commit7c078db879c2f645a803224c5f9b70ed9cb8d911 (patch)
treebfd9f88a569238e5cc4ad7eddb0094b10b99226d /src/common/server.c
parentebb0fd6905d6af6daaa2db15b71d4cacd028e14a (diff)
Fix loading encoding from network list on connect
- Fix setting new encoding when switching networks
- Ignore ports when looking for network by hostname
- Only set UTF-8 when nothing explicitly set

Fixes #1628
Diffstat (limited to 'src/common/server.c')
-rw-r--r--src/common/server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/server.c b/src/common/server.c
index 709bfb22..b94f57e7 100644
--- a/src/common/server.c
+++ b/src/common/server.c
@@ -1728,7 +1728,8 @@ server_set_defaults (server *serv)
 	serv->nick_modes = g_strdup ("ohv");
 	serv->sasl_mech = MECH_PLAIN;
 
-	server_set_encoding (serv, "UTF-8");
+	if (!serv->encoding)
+		server_set_encoding (serv, "UTF-8");
 
 	serv->nickcount = 1;
 	serv->end_of_motd = FALSE;