]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add skeleton functions for UID stuff.
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 26 Aug 2007 23:07:06 +0000 (23:07 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 26 Aug 2007 23:07:06 +0000 (23:07 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7845 e03df62e-2008-0410-955e-edbf42e46eb7

include/inspircd.h
include/uid.h [new file with mode: 0644]
include/users.h
src/server.cpp

index 38ec9cf433b1bd0735026d9db781b13a03c6fd3a..06fdd71248dd8e0fc366deecb62be056afc59893 100644 (file)
@@ -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 (file)
index 0000000..81df7f2
--- /dev/null
@@ -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
+
+
index 66ca2b9ccd9239b95da35da504e31826af07b9f2..bcd67a65d138c1ceed30afd81b149a53c1fbd872 100644 (file)
@@ -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.
         */
index b3b02f507ccc9e4f27ac7945d61a2eeff8a360e5..1ab5b5efdc51eb9614725c66b7f0d35ba3bbe9c9 100644 (file)
@@ -131,3 +131,10 @@ bool InspIRCd::FindServerName(const std::string &servername)
        return false;
 }
 
+std::string InspIRCd::GetUID()
+{
+
+}
+
+
+