X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fserver.cpp;h=a24a1092f59645eddcac338a30103821362885b9;hb=92eda175245c3d3da6b41af5c52d1540a23a0dc3;hp=f69b4fd3bd745d1a9cb9ff94b4f5057a3d11a171;hpb=519d8e5dfe379840ae5da2ac43231ec4364d7b18;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/server.cpp b/src/server.cpp index f69b4fd3b..a24a1092f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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)