newconf changes

This commit is contained in:
codemastr 2001-02-19 17:11:17 +00:00
parent eb6d81e199
commit b53a38c15c
3 changed files with 27 additions and 17 deletions

View file

@ -221,3 +221,5 @@
TODOs: dcc_del_wild_match doesn't work. dcc_wipe_services() either
- Made deny_dcc get rehashed
- Made it so the IRCd can survive with certain set {} errors (uses defaults)
- stats-server and services-server are no longer required (missing = disabled services aliases)
- socks set {} options are now optional. Defaults are used if missing

View file

@ -2199,7 +2199,7 @@ void validate_configuration(void)
if (Missing(defserv))
Error("set::default-server is missing");
if (Missing(SERVICES_NAME))
Error("set::services-server is missing");
Warning("set::services-server is missing. All services commands are being disabled");
if (Missing(oper_host)) {
Warning("set::hosts::global is missing");
hide_host = 0;
@ -2236,12 +2236,20 @@ void validate_configuration(void)
Error("set::hiddenhost-prefix is missing");
if (Missing(helpchan))
Error("set::help-channel is missing");
if (Missing(STATS_SERVER))
Error("set::stats-server is missing");
if (Missing(iConf.socksbanmessage))
Error("set::socks::ban-message is missing");
if (Missing(iConf.socksquitmessage))
Error("set::socks::quit-message is missing");
if (Missing(STATS_SERVER))
Warning("set::stats-server is missing. /statserv is being disabled");
if (iConf.socksbantime < 10) {
Warning("set::socks::ban-time is invalid. Using default of 1 day");
iConf.socksbantime = 86400;
}
if (Missing(iConf.socksbanmessage)) {
Warning("set::socks::ban-message is missing. Using default of \"Insecure SOCKS server\"");
ircstrdup(iConf.socksbanmessage, "Insecure SOCKS server");
}
if (Missing(iConf.socksquitmessage)) {
Warning("set::socks::quit-message is missing. Using default of \"Insecure SOCKS server\"");
ircstrdup(iConf.socksquitmessage, "Insecure SOCKS server");
}
/* Now for the real config */
if (conf_me)

View file

@ -2163,7 +2163,7 @@ int m_chanserv(cptr, sptr, parc, parv)
return -1;
}
if ((acptr = find_person(ChanServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(ChanServ, NULL)))
sendto_one(acptr, ":%s PRIVMSG %s@%s :%s", parv[0],
ChanServ, SERVICES_NAME, parv[1]);
else
@ -2184,7 +2184,7 @@ int m_memoserv(cptr, sptr, parc, parv)
return -1;
}
if ((acptr = find_person(MemoServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(MemoServ, NULL)))
sendto_one(acptr, ":%s PRIVMSG %s@%s :%s", parv[0],
MemoServ, SERVICES_NAME, parv[1]);
else
@ -2206,7 +2206,7 @@ int m_nickserv(cptr, sptr, parc, parv)
return -1;
}
if ((acptr = find_person(NickServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(NickServ, NULL)))
sendto_one(acptr, ":%s PRIVMSG %s@%s :%s", parv[0],
NickServ, SERVICES_NAME, parv[1]);
else
@ -2228,7 +2228,7 @@ int m_botserv(cptr, sptr, parc, parv)
return -1;
}
if ((acptr = find_person(BotServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(BotServ, NULL)))
sendto_one(acptr, ":%s PRIVMSG %s@%s :%s", parv[0],
BotServ, SERVICES_NAME, parv[1]);
else
@ -2248,7 +2248,7 @@ int m_infoserv(cptr, sptr, parc, parv)
return -1;
}
if ((acptr = find_person(InfoServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(InfoServ, NULL)))
{
sendto_one(acptr, ":%s PRIVMSG %s@%s :%s", parv[0],
InfoServ, SERVICES_NAME, parv[1]);
@ -2270,7 +2270,7 @@ int m_operserv(cptr, sptr, parc, parv)
sendto_one(sptr, err_str(ERR_NOTEXTTOSEND), me.name, parv[0]);
return -1;
}
if ((acptr = find_person(OperServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(OperServ, NULL)))
sendto_one(acptr, ":%s PRIVMSG %s@%s :%s", parv[0],
OperServ, SERVICES_NAME, parv[1]);
else
@ -2292,7 +2292,7 @@ int m_helpserv(cptr, sptr, parc, parv)
return -1;
}
if ((acptr = find_person(HelpServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(HelpServ, NULL)))
sendto_one(acptr, ":%s PRIVMSG %s@%s :%s", parv[0],
HelpServ, SERVICES_NAME, parv[1]);
else
@ -2316,7 +2316,7 @@ int m_statserv(cptr, sptr, parc, parv)
return -1;
}
if ((acptr = find_person(StatServ, NULL)))
if (STATS_SERVER && (acptr = find_person(StatServ, NULL)))
#ifndef STATSERV_ABSOLUTE
if (!strncmp(acptr->srvptr->name, STATS_SERVER,
strlen(STATS_SERVER)))
@ -2363,7 +2363,7 @@ int m_identify(cptr, sptr, parc, parv)
{
if ((*parv[1] == '#') && ((char *)index(parv[1], ' ')))
{
if ((acptr = find_person(ChanServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(ChanServ, NULL)))
sendto_one(acptr,
":%s PRIVMSG %s@%s :IDENTIFY %s", parv[0],
ChanServ, SERVICES_NAME, parv[1]);
@ -2373,7 +2373,7 @@ int m_identify(cptr, sptr, parc, parv)
}
else
{
if ((acptr = find_person(NickServ, NULL)))
if (SERVICES_NAME && (acptr = find_person(NickServ, NULL)))
sendto_one(acptr,
":%s PRIVMSG %s@%s :IDENTIFY %s", parv[0],
NickServ, SERVICES_NAME, parv[1]);