X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fuid.h;h=772c8a7165fafb9b36e35db98b4885afa1be1add;hb=7f7ffef3b4d5dc6242918a48713d6fab96928a80;hp=8be003628393e8aa286f419f77a3c95367b6ea1a;hpb=48f7fa6b11a0a6b1526c54914e60ddbe51ede8c4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/uid.h b/include/uid.h index 8be003628..772c8a716 100644 --- a/include/uid.h +++ b/include/uid.h @@ -18,13 +18,6 @@ #pragma once -/** - * This is the maximum length of a UUID (unique user identifier). - * This length is set in compliance with TS6 protocol, and really should not be changed. Ever. - * It allows for a lot of clients as-is. -- w00t. - */ -#define UUID_LENGTH 10 - class TestSuite; class CoreExport UIDGenerator @@ -33,13 +26,20 @@ class CoreExport UIDGenerator /** Holds the current UID. Used to generate the next one. */ - char current_uid[UUID_LENGTH]; + std::string current_uid; /** Increments the current UID by one. */ void IncrementUID(unsigned int pos); public: + /** + * This is the maximum length of a UUID (unique user identifier). + * This length is set in compliance with TS6 protocol, and really should not be changed. Ever. + * It allows for a lot of clients as-is. -- w00t. + */ + static const unsigned int UUID_LENGTH = 9; + /** Initializes this UID generator with the given SID * @param sid SID that conforms to InspIRCd::IsSID() */