From a997f6184178ab6ca94b26f81d14a11902fa0eef Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 26 Aug 2007 23:47:52 +0000 Subject: Initial UUID generation code. Generates a TS6 compatible UUID. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7846 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5c1835b03..e7d43edff 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -529,6 +529,21 @@ InspIRCd::InspIRCd(int argc, char** argv) FreeConsole(); } #endif + + + /* + * Initialise UID. XXX, we need to read SID from config, and use it instead of 000. + * For an explanation as to exactly how this works, and why it works this way, see GetUID(). + * -- w00t + */ + int i; + + for(i = 0; i < 3; i++) + current_uid[i] = '0'; + + for(i = 3; i < UUID_LENGTH - 1; i++) + current_uid[i] = 'A'; + printf("\nInspIRCd is now running!\n"); Log(DEFAULT,"Startup complete."); -- cgit v1.2.3