diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 9 | ||||
-rw-r--r-- | include/uid.h | 21 | ||||
-rw-r--r-- | include/users.h | 5 |
3 files changed, 35 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 38ec9cf43..06fdd7124 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -29,6 +29,7 @@ #include <string> #include <sstream> #include "inspircd_config.h" +#include "uid.h" #include "users.h" #include "channels.h" #include "socket.h" @@ -254,6 +255,10 @@ class XLineManager; class CoreExport InspIRCd : public classbase { private: + /** Holds the current UID. Used to generate the next one. + */ + char current_uid[UUID_LENGTH]; + /** Holds a string describing the last module error to occur */ char MODERR[MAXBUF]; @@ -390,6 +395,10 @@ class CoreExport InspIRCd : public classbase */ std::map<InspSocket*,InspSocket*> SocketCull; + /** Returns the next available UID for this server. + */ + std::string GetUID(); + /** Build the ISUPPORT string by triggering all modules On005Numeric events */ void BuildISupport(); diff --git a/include/uid.h b/include/uid.h new file mode 100644 index 000000000..81df7f27f --- /dev/null +++ b/include/uid.h @@ -0,0 +1,21 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + +/** + * 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 + + diff --git a/include/users.h b/include/users.h index 66ca2b9cc..bcd67a65d 100644 --- a/include/users.h +++ b/include/users.h @@ -490,6 +490,11 @@ class CoreExport userrec : public connection */ char nick[NICKMAX]; + /** The user's unique identifier. + * This is the unique identifier which the user has across the network. + */ + char uuid[UUID_LENGTH]; + /** The users ident reply. * Two characters are added to the user-defined limit to compensate for the tilde etc. */ |