From 248fa43bf98d61bc84025b68ac373b7c42d728f6 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 21 Nov 2018 13:22:22 +0000 Subject: Kill users that fail a WEBIRC auth instead of penalising them. This behaviour is specified in the IRCv3 WebIRC specification. --- src/modules/m_cgiirc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 4d0edcb23..1e5a188f8 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -170,9 +170,9 @@ class CommandWebIRC : public SplitCommand irc::sockets::sockaddrs ipaddr; if (!irc::sockets::aptosa(parameters[3], user->client_sa.port(), ipaddr)) { - user->CommandFloodPenalty += 5000; WriteLog("Connecting user %s (%s) tried to use WEBIRC but gave an invalid IP address.", user->uuid.c_str(), user->GetIPString().c_str()); + ServerInstance->Users->QuitUser(user, "WEBIRC: IP address is invalid: " + parameters[3]); return CMD_FAILURE; } @@ -217,9 +217,9 @@ class CommandWebIRC : public SplitCommand return CMD_SUCCESS; } - user->CommandFloodPenalty += 5000; WriteLog("Connecting user %s (%s) tried to use WEBIRC but didn't match any configured WebIRC hosts.", user->uuid.c_str(), user->GetIPString().c_str()); + ServerInstance->Users->QuitUser(user, "WEBIRC: you don't match any configured WebIRC hosts."); return CMD_FAILURE; } -- cgit v1.2.3