summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2024-11-09 23:56:15 +0000
committerLuke Bratch <luke@bratch.co.uk>2024-11-09 23:56:15 +0000
commitfeeb625db4837f3f91a722cd7866ce7da253d593 (patch)
treee422d80b4104110a32e9106c15532ff8287afadc
parentf55160af3f25fff17d3af4dde50a606c2c78f79b (diff)
Send NOTICE alert about failed authentication before disconnection alert.
-rw-r--r--TODO2
-rw-r--r--message.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/TODO b/TODO
index 28fdc13..29193ab 100644
--- a/TODO
+++ b/TODO
@@ -56,6 +56,4 @@ Ability to check for updates (and optional at startup?).
Absurd CPU usage and duration doing "/BLABOUNCER REPLAY 24:0" approx. 14/09/2024 17:35.
-Send NOTICE about failed authentication before disconnecting.
-
Failure to read configuration file suggestion that an upgrade may require new settings.
diff --git a/message.c b/message.c
index 7e5497e..b574586 100644
--- a/message.c
+++ b/message.c
@@ -925,7 +925,6 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
char remoteip[INET6_ADDRSTRLEN];
strncpy(remoteip, clients[clientindex].remoteip, INET6_ADDRSTRLEN);
debugprint(DEBUG_SOME, "Password rejected, disconnecting client %s with fd %d.\n", remoteip, sourcefd);
- disconnectclient(sourcefd, clients, ircdstate, settings, clientcodes);
// Alert other clients about the failed authentication (if enabled)
if (settings->alertauthfail) {
char alertmsg[MAXDATASIZE];
@@ -937,6 +936,7 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
// "except" 0 since we trust this message
sendtoallclients(clients, alertmsg, 0, settings);
}
+ disconnectclient(sourcefd, clients, ircdstate, settings, clientcodes);
}
return 1;