mirror of
https://github.com/znc/znc.git
synced 2026-05-09 06:44:40 +02:00
Respond to 670 from the server by switching to TLS
If a client sends STARTTLS to the IRC server, once the IRC server responds with a 670 then it will expect all future communications to happen over TLS.
This commit is contained in:
@@ -371,6 +371,15 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 670:
|
||||
// :hydra.sector5d.org 670 kylef :STARTTLS successful, go ahead with TLS handshake
|
||||
// 670 is a responce to `STARTTLS` telling the client to switch to TLS
|
||||
|
||||
if (!GetSSL()) {
|
||||
StartTLS();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
CNick Nick(sLine.Token(0).TrimPrefix_n());
|
||||
|
||||
Reference in New Issue
Block a user