summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-12-16 02:39:31 +0000
committerAttila Molnar <attilamolnar@hush.com>2014-01-04 19:31:29 +0100
commit428e8f4f693192a527065e5488bbc7fceb938b6f (patch)
tree00dc71a91e49531e4c37c2c429ddc24db026780b /src
parent57d02ca02e441971bf27fae2c2ba5302c60e43c9 (diff)
Fix some Windows-related problems.
- Fix an error relating to the unavailability of std::back_inserter. - Fix loading configuration files when using relative paths. - Fix two methods in hashcomp being exported twice. - Remove some unimportant error messages.
Diffstat (limited to 'src')
-rw-r--r--src/configparser.cpp7
-rw-r--r--src/modules/m_spanningtree/utils.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp
index 0e2a86706..e23d6ec43 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -300,7 +300,7 @@ void ParseStack::DoInclude(ConfigTag* tag, int flags)
flags |= FLAG_NO_INC;
if (tag->getBool("noexec", false))
flags |= FLAG_NO_EXEC;
- if (!ParseFile(name, flags, mandatorytag))
+ if (!ParseFile(ServerInstance->Config->Paths.PrependConfig(name), flags, mandatorytag))
throw CoreException("Included");
}
else if (tag->readString("executable", name))
@@ -344,13 +344,12 @@ void ParseStack::DoReadFile(const std::string& key, const std::string& name, int
}
}
-bool ParseStack::ParseFile(const std::string& name, int flags, const std::string& mandatory_tag)
+bool ParseStack::ParseFile(const std::string& path, int flags, const std::string& mandatory_tag)
{
- std::string path = ServerInstance->Config->Paths.PrependConfig(name);
ServerInstance->Logs->Log("CONFIG", LOG_DEBUG, "Reading file %s", path.c_str());
for (unsigned int t = 0; t < reading.size(); t++)
{
- if (std::string(name) == reading[t])
+ if (path == reading[t])
{
throw CoreException("File " + path + " is included recursively (looped inclusion)");
}
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index c9abbd008..dbd246ffe 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -227,7 +227,7 @@ void SpanningTreeUtilities::RefreshIPCache()
continue;
}
- std::copy(L->AllowMasks.begin(), L->AllowMasks.end(), std::back_inserter(ValidIPs));
+ ValidIPs.insert(ValidIPs.end(), L->AllowMasks.begin(), L->AllowMasks.end());
irc::sockets::sockaddrs dummy;
bool ipvalid = irc::sockets::aptosa(L->IPAddr, L->Port, dummy);