]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/server.cpp
Fix a silly bug we never thought was a bug, in m_messageflood - the message that...
[user/henk/code/inspircd.git] / src / server.cpp
index f69b4fd3bd745d1a9cb9ff94b4f5057a3d11a171..a24a1092f59645eddcac338a30103821362885b9 100644 (file)
@@ -78,11 +78,11 @@ std::string InspIRCd::GetVersionString()
        char versiondata[MAXBUF];
        if (*Config->CustomVersion)
        {
-               snprintf(versiondata,MAXBUF,"%s %s :%s",VERSION,Config->ServerName,Config->CustomVersion);
+               snprintf(versiondata,MAXBUF,"InspIRCd-1.2 %s :%s",Config->ServerName,Config->CustomVersion);
        }
        else
        {
-               snprintf(versiondata,MAXBUF,"%s %s :%s [FLAGS=%s,%s,%s]",VERSION,Config->ServerName,SYSTEM,REVISION,SE->GetName().c_str(),Config->sid);
+               snprintf(versiondata,MAXBUF,"InspIRCd-1.2 %s :%s (%s) [FLAGS=%s,%s,%s]",Config->ServerName,SYSTEM,VERSION,REVISION,SE->GetName().c_str(),Config->sid);
        }
        return versiondata;
 }
@@ -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)