X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=0f6d414ddf8515eb0df02b73d0be44abb809bb64;hb=92cc388aebd55245b24aef5950afe845feffe9e2;hp=7493d980cbf5f4a3fd0a3f8bb2c4c33053c22edd;hpb=b7d84270bce15507775c7ec216dc1d5ad8b02a53;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 7493d980c..0f6d414dd 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -335,6 +335,7 @@ struct DeprecatedConfig static const DeprecatedConfig ChangedConfig[] = { { "bind", "transport", "", "has been moved to as of 2.0" }, { "die", "value", "", "you need to reread your config" }, + { "gnutls", "starttls", "", "has been replaced with m_starttls as of 2.2" }, { "link", "autoconnect", "", "2.0+ does not use this attribute - define tags instead" }, { "link", "transport", "", "has been moved to as of 2.0" }, { "module", "name", "m_chanprotect.so", "has been replaced with m_customprefix as of 2.2" }, @@ -444,19 +445,6 @@ void ServerConfig::Fill() else ServerInstance->SE->Close(socktest); } - ConfigTagList tags = ConfTags("uline"); - for(ConfigIter i = tags.first; i != tags.second; ++i) - { - ConfigTag* tag = i->second; - std::string server; - if (!tag->readString("server", server)) - throw CoreException(" tag missing server at " + tag->getTagLocation()); - - if (ServerName == server) - throw CoreException("Servers should not uline themselves (at " + tag->getTagLocation() + ")"); - - ulines[assign(server)] = tag->getBool("silent"); - } ReadXLine(this, "badip", "ipmask", ServerInstance->XLines->GetFactory("Z")); ReadXLine(this, "badnick", "nick", ServerInstance->XLines->GetFactory("Q")); @@ -641,10 +629,6 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) ConfigFileCache::iterator file = this->Files.find(tag->getString("motd", "motd")); if (file != this->Files.end()) InspIRCd::ProcessColors(file->second); - - file = this->Files.find(tag->getString("rules", "rules")); - if (file != this->Files.end()) - InspIRCd::ProcessColors(file->second); } /* No old configuration -> initial boot, nothing more to do here */ @@ -734,11 +718,6 @@ void ServerConfig::ApplyModules(User* user) } } -bool ServerConfig::StartsWithWindowsDriveLetter(const std::string &path) -{ - return (path.length() > 2 && isalpha(path[0]) && path[1] == ':'); -} - ConfigTag* ServerConfig::ConfValue(const std::string &tag) { ConfigTagList found = config_data.equal_range(tag); @@ -757,18 +736,6 @@ ConfigTagList ServerConfig::ConfTags(const std::string& tag) return config_data.equal_range(tag); } -bool ServerConfig::FileExists(const char* file) -{ - struct stat sb; - if (stat(file, &sb) == -1) - return false; - - if ((sb.st_mode & S_IFDIR) > 0) - return false; - - return !access(file, F_OK); -} - std::string ServerConfig::Escape(const std::string& str, bool xml) { std::string escaped; @@ -793,22 +760,6 @@ std::string ServerConfig::Escape(const std::string& str, bool xml) return escaped; } -std::string ServerConfig::ExpandPath(const std::string& base, const std::string& fragment) -{ - // The fragment is an absolute path, don't modify it. - if (fragment[0] == '/' || ServerConfig::StartsWithWindowsDriveLetter(fragment)) - return fragment; - - return base + '/' + fragment; -} - -const char* ServerConfig::CleanFilename(const char* name) -{ - const char* p = name + strlen(name); - while ((p != name) && (*p != '/') && (*p != '\\')) p--; - return (p != name ? ++p : p); -} - void ConfigReaderThread::Run() { Config->Read();