diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-12 12:22:57 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-12 12:24:02 +0000 |
commit | 06add0e5fc1b83b43014e731cb94229ab2be66f6 (patch) | |
tree | 16e08617a2e81a6bc8f44ab513e056a792bb07c2 /include | |
parent | 63d682314b7eb3f6e25ecf4ba81dc3bb17270f0e (diff) |
Simplify limit extraction code.
Diffstat (limited to 'include')
-rw-r--r-- | include/protocol.h | 28 |
1 files changed, 15 insertions, 13 deletions
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 |