aboutsummaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-03-23 07:42:47 +0000
committerGravatar Sadie Powell2025-03-23 07:42:47 +0000
commitfb219052c8a09bb8fa9635521756819482da2cdd (patch)
treee6d6f5fb492c588969d8ac89e1ab312454c23047 /src/helperfuncs.cpp
parentOnly include <sstream> from files that actually use it. (diff)
Move DefaultIsNick/DefaultIsUser/IsNick/IsUser to UserManager.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index c259a5ada..cf92be745 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -241,53 +241,6 @@ void InspIRCd::ProcessColors(std::string& line)
}
}
-/* true for valid nickname, false else */
-bool InspIRCd::DefaultIsNick(const std::string_view& n)
-{
- if (n.empty() || n.length() > ServerInstance->Config->Limits.MaxNick)
- return false;
-
- for (std::string_view::const_iterator i = n.begin(); i != n.end(); ++i)
- {
- if ((*i >= 'A') && (*i <= '}'))
- {
- /* "A"-"}" can occur anywhere in a nickname */
- continue;
- }
-
- if ((((*i >= '0') && (*i <= '9')) || (*i == '-')) && (i != n.begin()))
- {
- /* "0"-"9", "-" can occur anywhere BUT the first char of a nickname */
- continue;
- }
-
- /* invalid character! abort */
- return false;
- }
-
- return true;
-}
-
-/* return true for good username, false else */
-bool InspIRCd::DefaultIsUser(const std::string_view& n)
-{
- if (n.empty())
- return false;
-
- for (const auto chr : n)
- {
- if (chr >= 'A' && chr <= '}')
- continue;
-
- if ((chr >= '0' && chr <= '9') || chr == '-' || chr == '.')
- continue;
-
- return false;
- }
-
- return true;
-}
-
bool InspIRCd::IsHost(const std::string_view& host, bool allowsimple)
{
// Hostnames must be non-empty and shorter than the maximum hostname length.