Add extra detail to m_cloaking on failure to load

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7580 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2007-07-26 18:44:13 +00:00
parent a3008ff654
commit 7ea099f8d1
2 changed files with 19 additions and 1 deletions

View File

@ -382,17 +382,23 @@ void InspIRCd::WritePID(const std::string &filename)
InspIRCd::InspIRCd(int argc, char** argv)
: ModCount(0),
GlobalCulls(this),
/* Functor initialisation. Note that the ordering here is very important. */
HandleProcessUser(this),
HandleIsNick(this),
HandleIsIdent(this),
HandleFindDescriptor(this),
HandleFloodQuitUser(this),
/* Functor pointer initialisation. Must match the order of the list above */
ProcessUser(&HandleProcessUser),
IsNick(&HandleIsNick),
IsIdent(&HandleIsIdent),
FindDescriptor(&HandleFindDescriptor),
FloodQuitUser(&HandleFloodQuitUser)
{
int found_ports = 0;
FailedPortList pl;
int do_version = 0, do_nofork = 0, do_debug = 0, do_nolog = 0, do_root = 0; /* flag variables */

View File

@ -254,7 +254,19 @@ class CloakUser : public ModeHandler
prefix = ServerInstance->Config->Network;
if (!key1 || !key2 || !key3 || !key4)
throw ModuleException("You have not defined cloak keys for m_cloaking!!! THIS IS INSECURE AND SHOULD BE CHECKED!");
{
std::string detail;
if (!key1)
detail = "<cloak:key1> is not valid, it may be set to a too high/low value, or it may not exist.";
else if (!key2)
detail = "<cloak:key2> is not valid, it may be set to a too high/low value, or it may not exist.";
else if (!key3)
detail = "<cloak:key3> is not valid, it may be set to a too high/low value, or it may not exist.";
else if (!key4)
detail = "<cloak:key4> is not valid, it may be set to a too high/low value, or it may not exist.";
throw ModuleException("You have not defined cloak keys for m_cloaking!!! THIS IS INSECURE AND SHOULD BE CHECKED! - " + detail);
}
}
};