X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=20cc0c2b3c30f63c3c8d15f9f9ceb7e98aa71713;hb=f1c95ba9301178017542afe9262a3f2f0528afd5;hp=b34c3eccaf346c5490e111a57a9cc6a537b75313;hpb=8e34d66ef3bef802e5758ad73ff29e1b75aaba7f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index b34c3ecca..20cc0c2b3 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -11,20 +11,6 @@ * --------------------------------------------------- */ -/* $Core */ -/* $CopyInstall: conf/inspircd.quotes.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.rules.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.motd.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.helpop-full.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.helpop.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.censor.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.filter.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.conf.example $(CONPATH) */ -/* $CopyInstall: conf/modules.conf.example $(CONPATH) */ -/* $CopyInstall: conf/opers.conf.example $(CONPATH) */ -/* $CopyInstall: conf/links.conf.example $(CONPATH) */ -/* $CopyInstall: tools/gdbargs $(BASE)/.gdbargs */ - #include "inspircd.h" #include #include "xline.h" @@ -588,8 +574,6 @@ void ServerConfig::Read() } if (valid) { - ReadFile(MOTD, ConfValue("files")->getString("motd")); - ReadFile(RULES, ConfValue("files")->getString("rules")); DNSServer = ConfValue("dns")->getString("server"); FindDNS(DNSServer); } @@ -792,34 +776,6 @@ ConfigTagList ServerConfig::ConfTags(const std::string& tag) return config_data.equal_range(tag); } -/** Read the contents of a file located by `fname' into a file_cache pointed at by `F'. - */ -bool ServerConfig::ReadFile(file_cache &F, const std::string& fname) -{ - if (fname.empty()) - return false; - - char linebuf[MAXBUF]; - - F.clear(); - - FileWrapper file(fopen(fname.c_str(), "r")); - - if (!file) - return false; - while (!feof(file)) - { - if (fgets(linebuf, sizeof(linebuf), file)) - linebuf[strlen(linebuf)-1] = 0; - else - *linebuf = 0; - - F.push_back(*linebuf ? linebuf : " "); - } - - return true; -} - bool ServerConfig::FileExists(const char* file) { struct stat sb;