From 54eae2619c6227c78d624e09a05d41ca51a26f77 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 12 Feb 2026 13:17:53 +0000 Subject: Remove InValidMask as it only has one unnecessary use. --- src/helperfuncs.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index f5ea085c8..51cef7604 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -36,41 +36,6 @@ #include "utility/string.h" #include "xline.h" -bool InspIRCd::IsValidMask(const std::string& mask) -{ - const char* dest = mask.c_str(); - int exclamation = 0; - int atsign = 0; - - for (const char* i = dest; *i; i++) - { - /* out of range character, bad mask */ - if (*i < 32 || *i > 126) - { - return false; - } - - switch (*i) - { - case '!': - exclamation++; - break; - case '@': - atsign++; - break; - } - } - - /* valid masks only have 1 ! and @ */ - if (exclamation != 1 || atsign != 1) - return false; - - if (mask.length() > ServerInstance->Config->Limits.GetMaxMask()) - return false; - - return true; -} - void InspIRCd::StripColor(std::string& line) { for (size_t idx = 0; idx < line.length(); ) -- cgit v1.3.1-10-gc9f91