]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix unnecessary use of map, set is better suited.
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 27 Dec 2008 13:52:37 +0000 (13:52 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 27 Dec 2008 13:52:37 +0000 (13:52 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10921 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_shun.cpp

index 25e8f7be8875bdce95877f75f3202bb1463d8891..8cc89cad3ee4c994ca24fb3de31626b635b7d590 100644 (file)
@@ -158,7 +158,7 @@ class ModuleShun : public Module
 {
        CommandShun* mycommand;
        ShunFactory *f;
-       std::map<std::string, bool> ShunEnabledCommands;
+       std::set<std::string> ShunEnabledCommands;
        bool NotifyOfShun;
 
  public:
@@ -206,7 +206,7 @@ class ModuleShun : public Module
 
                while (dcmds >> thiscmd)
                {
-                       ShunEnabledCommands[thiscmd] = true;
+                       ShunEnabledCommands.insert(thiscmd);
                }
 
                NotifyOfShun = MyConf.ReadFlag("shun", "notifyuser", "yes", 0);
@@ -239,7 +239,7 @@ class ModuleShun : public Module
                        return 0;
                }
 
-               std::map<std::string, bool>::iterator i = ShunEnabledCommands.find(command);
+               std::set<std::string>::iterator i = ShunEnabledCommands.find(command);
 
                if (i == ShunEnabledCommands.end())
                {