summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-22 16:37:32 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-22 16:37:32 +0200
commitadc366ab1dd3274855bc6abbfe256567825b232e (patch)
treea24a09cc181b8ffa9f3629924ca905ca2916f84d
parentc808355050c368a306cd9d5d62b8c05094c11404 (diff)
Replace irc::string in XLineLookup with irc::insensitive_swo map
-rw-r--r--include/typedefs.h2
-rw-r--r--src/xline.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/typedefs.h b/include/typedefs.h
index 48842ccf0..879ef0627 100644
--- a/include/typedefs.h
+++ b/include/typedefs.h
@@ -99,7 +99,7 @@ typedef std::map<std::string, XLineFactory*> XLineFactMap;
/** A map of XLines indexed by string
*/
-typedef std::map<irc::string, XLine *> XLineLookup;
+typedef std::map<std::string, XLine*, irc::insensitive_swo> XLineLookup;
/** A map of XLineLookup maps indexed by string
*/
diff --git a/src/xline.cpp b/src/xline.cpp
index 30a1d7c9c..b116d2e1f 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -259,7 +259,7 @@ bool XLineManager::AddLine(XLine* line, User* user)
ContainerIter x = lookup_lines.find(line->type);
if (x != lookup_lines.end())
{
- LookupIter i = x->second.find(line->Displayable().c_str());
+ LookupIter i = x->second.find(line->Displayable());
if (i != x->second.end())
{
// XLine propagation bug was here, if the line to be added already exists and
@@ -281,7 +281,7 @@ bool XLineManager::AddLine(XLine* line, User* user)
if (xlf->AutoApplyToUserList(line))
pending_lines.push_back(line);
- lookup_lines[line->type][line->Displayable().c_str()] = line;
+ lookup_lines[line->type][line->Displayable()] = line;
line->OnAdd();
FOREACH_MOD(OnAddLine, (user, line));