mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Fix empty SID validation and generation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11851 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
7ba6c9f001
commit
f741fa6e3c
@ -412,7 +412,7 @@ static bool ValidateSID(ServerConfig* conf, const char*, const char*, ValueItem
|
||||
|
||||
const std::string& sid = data.GetValue();
|
||||
|
||||
if (!ServerInstance->IsSID(sid))
|
||||
if (!sid.empty() && !ServerInstance->IsSID(sid))
|
||||
{
|
||||
throw CoreException(sid + " is not a valid server ID. A server ID must be 3 characters long, with the first character a digit and the next two characters a digit or letter.");
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
|
||||
if (Config->sid.empty())
|
||||
{
|
||||
// Generate one
|
||||
int sid = 0;
|
||||
unsigned int sid = 0;
|
||||
char sidstr[4];
|
||||
|
||||
for (const char* x = Config->ServerName.c_str(); *x; ++x)
|
||||
|
Loading…
x
Reference in New Issue
Block a user