summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/client.c b/client.c
index 6c12405..ea28d82 100644
--- a/client.c
+++ b/client.c
@@ -232,9 +232,10 @@ static void handleCap(struct Client *client, struct Message *msg) {
 
 static void handleAuthenticate(struct Client *client, struct Message *msg) {
 	if (!msg->params[0]) msg->params[0] = "";
-	if (!strcmp(msg->params[0], "EXTERNAL")) {
+	bool cert = (clientCaps & CapSASL) && tls_peer_cert_provided(client->tls);
+	if (cert && !strcmp(msg->params[0], "EXTERNAL")) {
 		clientFormat(client, "AUTHENTICATE +\r\n");
-	} else if (!strcmp(msg->params[0], "+")) {
+	} else if (cert && !strcmp(msg->params[0], "+")) {
 		clientFormat(
 			client, ":%s 900 * %s * :You are now logged in as *\r\n",
 			ORIGIN, stateEcho()
/span>Set bot mode on downgradeJune McEnroe 2021-09-15Enter capsicum in downgradeJune McEnroe 2021-09-15Factor out common parts of downgrade messagesJune McEnroe 2021-09-14Add downgrade IRC botJune McEnroe 2021-09-14Sort by title if authors matchJune McEnroe 2021-09-13Swap-remove tags as they're foundJune McEnroe 2021-09-12Replace htagml regex with strncmpJune McEnroe 2021-09-11Also defer printing comment for lone close-parensJune McEnroe 2021-09-10Publish "git-comment"June McEnroe 2021-09-10Add git comment --pretty optionJune McEnroe 2021-09-08Defer printing comment if line is blank or closing braceJune McEnroe 2021-09-08Up default min-repeat to 30 linesJune McEnroe 2021-09-08Handle dirty lines in git-commentJune McEnroe 2021-09-08Document and install git-commentJune McEnroe 2021-09-08Add repeat and all options to git-commentJune McEnroe 2021-09-08Add group threshold to git-commentJune McEnroe