Browse Source

Fix the command table not being case insensitive.

This is not an issue normally but in some circumstances (e.g. when
disabling commands) it can result in command lookups failing even
when they exist.
Peter Powell 1 year ago
parent
commit
f237007bc1
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      include/typedefs.h

+ 5
- 1
include/typedefs.h View File

@@ -120,7 +120,11 @@ typedef std::map<std::string, file_cache> ConfigFileCache;
120 120
 
121 121
 /** A hash of commands used by the core
122 122
  */
123
-typedef nspace::hash_map<std::string,Command*> Commandtable;
123
+#ifdef HASHMAP_DEPRECATED
124
+	typedef nspace::hash_map<std::string, Command*, nspace::insensitive, irc::StrHashComp> Commandtable;
125
+#else
126
+	typedef nspace::hash_map<std::string, Command*, nspace::hash<std::string>, irc::StrHashComp> Commandtable;
127
+#endif
124 128
 
125 129
 /** Membership list of a channel */
126 130
 typedef std::map<User*, Membership*> UserMembList;