summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d920a25)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2808
e03df62e-2008-0410-955e-
edbf42e46eb7
bool ServerConfig::CheckOnce(char* tag, bool bail, userrec* user)
{
bool ServerConfig::CheckOnce(char* tag, bool bail, userrec* user)
{
- if (ConfValueEnum(tag,&Config->config_f) > 1)
+ int count = ConfValueEnum(tag,&Config->config_f);
+ if (count > 1)
+ if (count < 1)
+ {
+ if (bail)
+ {
+ printf("There were errors in your configuration:\nYou have not defined a <%s> tag, this is required.",tag);
+ Exit(0);
+ }
+ else
+ {
+ if (user)
+ {
+ WriteServ(user->fd,"There were errors in your configuration:");
+ WriteServ(user->fd,"You have not defined a <%s> tag, this is required.",tag);
+ }
+ else
+ {
+ WriteOpers("There were errors in the configuration file:");
+ WriteOpers("You have not defined a <%s> tag, this is required.",tag);
+ }
+ }
+ return false;
+ }
*/
if (!CheckOnce("server",bail,user) || !CheckOnce("admin",bail,user) || !CheckOnce("files",bail,user)
|| !CheckOnce("power",bail,user) || !CheckOnce("options",bail,user)
*/
if (!CheckOnce("server",bail,user) || !CheckOnce("admin",bail,user) || !CheckOnce("files",bail,user)
|| !CheckOnce("power",bail,user) || !CheckOnce("options",bail,user)
- || !CheckOnce("dns",bail,user) || !CheckOnce("options",bail,user)
- || !CheckOnce("disabled",bail,user) || !CheckOnce("pid",bail,user))
+ || !CheckOnce("dns",bail,user) || !CheckOnce("pid",bail,user))