]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Replace irc::string in XLineLookup with irc::insensitive_swo map
authorAttila Molnar <attilamolnar@hush.com>
Mon, 22 Aug 2016 14:37:32 +0000 (16:37 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Mon, 22 Aug 2016 14:37:32 +0000 (16:37 +0200)
include/typedefs.h
src/xline.cpp

index 48842ccf0fb442be842b7ffd8e66ec8abd05ec4b..879ef062741453846fcfc3ce794628327375ee97 100644 (file)
@@ -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
  */
index 30a1d7c9cc97428904084c1115779c6f0fc2dce0..b116d2e1f9eb5859e6e954b9345c4a9784264df8 100644 (file)
@@ -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));