summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/proto-irc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 9a53ed2e..776d1434 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -53,7 +53,9 @@ irc_login (server *serv, char *user, char *realname)
 
 	if (serv->password[0] && serv->loginmethod == LOGIN_PASS)
 	{
-		tcp_sendf (serv, "PASS %s\r\n", serv->password);
+		tcp_sendf (serv, "PASS %s%s\r\n",
+			(serv->password[0] == ':' || strchr (serv->password, ' ')) ? ":" : "",
+			serv->password);
 	}
 
 	tcp_sendf (serv,