From 06add0e5fc1b83b43014e731cb94229ab2be66f6 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 12 Mar 2024 12:22:57 +0000 Subject: Simplify limit extraction code. --- include/protocol.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/protocol.h b/include/protocol.h index f89df0ab1..1b067421c 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -110,12 +110,25 @@ public: /** Can we ask the server to unban a user? */ bool CanClearBans = false; - /* The maximum number of modes we are allowed to set with one MODE command */ - unsigned MaxModes = 3; + /* The maximum length of a channel name. */ + size_t MaxChannel = 0; + + /* The maximum length of a hostname. */ + size_t MaxHost = 0; /* The maximum number of bytes a line may have */ unsigned MaxLine = 512; + /* The maximum number of modes we are allowed to set with one MODE command */ + unsigned MaxModes = 3; + + /* The maximum length of a nickname. */ + size_t MaxNick = 0; + + /* The maximum length of a username. */ + size_t MaxUser = 0; + + /* Retrieves the next free UID or SID */ virtual Anope::string UID_Retrieve(); virtual Anope::string SID_Retrieve(); @@ -313,17 +326,6 @@ public: virtual Anope::string NormalizeMask(const Anope::string &mask); - /** Retrieves the maximum length of a channel name. */ - virtual size_t GetMaxChannel(); - - /** Retrieves the maximum length of a hostname. */ - virtual size_t GetMaxHost(); - - /** Retrieves the maximum length of a nickname. */ - virtual size_t GetMaxNick(); - - /** Retrieves the maximum length of a username. */ - virtual size_t GetMaxUser(); }; class CoreExport MessageSource final -- cgit