diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-16 21:36:07 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-16 21:36:07 +0000 |
commit | b979bc46743bcb180af93f34b4bb337edce67b7d (patch) | |
tree | 2b419ca64151c0d1887eb77e89a0deee3c134f95 /src/configreader.cpp | |
parent | c28e8dc34a04c1c91b268687e9e0b4146d7c3c3a (diff) |
Validate <server:id> on startup if provided, thx Brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8721 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 23c3fd925..d854edfaf 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -478,7 +478,13 @@ bool ValidateInvite(ServerConfig* conf, const char*, const char*, ValueItem &dat bool ValidateSID(ServerConfig* conf, const char*, const char*, ValueItem &data) { -// std::string sid = data.GetString(); + const char *sid = data.GetString(); + + if (*sid && !conf->GetInstance()->IsSID(sid)) + { + throw CoreException(std::string(sid) + " is not a valid server ID."); + } + return true; } |