diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 17:03:14 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 17:03:14 +0200 |
commit | dde2739382ddb9c512232c0d62bafa84cb0f75ab (patch) | |
tree | ea75c878f5ce46c5dede1d330af10e19c7965286 /src | |
parent | fea425704f1ab72dc7dbadb556958e71144c3765 (diff) |
m_spanningtree Use ASCII case insensitive map for matching server names
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 67c1afdac..f26b3c828 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -194,7 +194,7 @@ void ModuleSpanningTree::ConnectServer(Link* x, Autoconnect* y) { bool ipvalid = true; - if (InspIRCd::Match(ServerInstance->Config->ServerName, x->Name, rfc_case_insensitive_map)) + if (InspIRCd::Match(ServerInstance->Config->ServerName, x->Name, ascii_case_insensitive_map)) { ServerInstance->SNO->WriteToSnoMask('l', "CONNECT: Not connecting to myself."); return; @@ -318,9 +318,9 @@ ModResult ModuleSpanningTree::HandleConnect(const std::vector<std::string>& para for (std::vector<reference<Link> >::iterator i = Utils->LinkBlocks.begin(); i < Utils->LinkBlocks.end(); i++) { Link* x = *i; - if (InspIRCd::Match(x->Name.c_str(),parameters[0], rfc_case_insensitive_map)) + if (InspIRCd::Match(x->Name, parameters[0], ascii_case_insensitive_map)) { - if (InspIRCd::Match(ServerInstance->Config->ServerName, x->Name, rfc_case_insensitive_map)) + if (InspIRCd::Match(ServerInstance->Config->ServerName, x->Name, ascii_case_insensitive_map)) { user->WriteRemoteNotice(InspIRCd::Format("*** CONNECT: Server \002%s\002 is ME, not connecting.", x->Name.c_str())); return MOD_RES_DENY; diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 7ef20d202..c1c32e80a 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -331,7 +331,7 @@ Link* SpanningTreeUtilities::FindLink(const std::string& name) for (std::vector<reference<Link> >::iterator i = LinkBlocks.begin(); i != LinkBlocks.end(); ++i) { Link* x = *i; - if (InspIRCd::Match(x->Name.c_str(), name.c_str(), rfc_case_insensitive_map)) + if (InspIRCd::Match(x->Name, name, ascii_case_insensitive_map)) { return x; } |