summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-26 23:07:06 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-26 23:07:06 +0000
commit107595610061e05871094ef6161a287c1dd53737 (patch)
tree682b6c4115cb1c71609026da06808d632ecc42cb /include
parentca2a909147d2409742e5d895e049ae46f94f5f3a (diff)
Add skeleton functions for UID stuff.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7845 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h9
-rw-r--r--include/uid.h21
-rw-r--r--include/users.h5
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.
*/