diff options
author | Peter Powell <petpow@saberuk.com> | 2018-11-21 13:22:22 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-11-21 14:01:52 +0000 |
commit | 248fa43bf98d61bc84025b68ac373b7c42d728f6 (patch) | |
tree | 43183fdb373b2a4b4675296a969a3f0bc72161a9 | |
parent | a77954b2181e5f20e951a0a09579dfcfe3905641 (diff) |
Kill users that fail a WEBIRC auth instead of penalising them.
This behaviour is specified in the IRCv3 WebIRC specification.
-rw-r--r-- | src/modules/m_cgiirc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |