]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix all this crap - it actually works now (we pray..)
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 2 Apr 2008 12:33:01 +0000 (12:33 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 2 Apr 2008 12:33:01 +0000 (12:33 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9261 e03df62e-2008-0410-955e-edbf42e46eb7

include/uid.h
src/server.cpp

index 63b3e89f21e3c83ef72852d60a82e0d194d866c5..f5384049c79c2bc01bd90ffcbec15cfa85fbfc59 100644 (file)
@@ -16,6 +16,6 @@
  * 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 9
+#define UUID_LENGTH 10
 
 
index f69b4fd3bd745d1a9cb9ff94b4f5057a3d11a171..d0023edd453e838b9bce5b54932a78077d24abdc 100644 (file)
@@ -206,13 +206,13 @@ std::string InspIRCd::GetUID()
                current_uid[1] = Config->sid[1];
                current_uid[2] = Config->sid[2];
 
-               for (int i = 3; i < UUID_LENGTH; i++)
+               for (int i = 3; i < (UUID_LENGTH - 1); i++)
                        current_uid[i] = '9';
 
-               curindex = UUID_LENGTH - 1; // look at the end of the string now kthx
+               curindex = UUID_LENGTH - 2; // look at the end of the string now kthx, ignore null
 
                // Null terminator. Important.
-               current_uid[UUID_LENGTH] = '\0';
+               current_uid[UUID_LENGTH - 1] = '\0';
        }
 
        while (1)