summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-16 17:00:53 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-16 20:46:16 +0100
commitf237007bc1137dce5a7955238e7f0acd55942129 (patch)
tree6429929460abbba27ef6f5370584bb970f6dcec5 /include
parenta5d110282a864fd2e91b51ce360a977cd0643657 (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/typedefs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/typedefs.h b/include/typedefs.h
index 06f704120..03593d40f 100644
--- a/include/typedefs.h
+++ b/include/typedefs.h
@@ -120,7 +120,11 @@ typedef std::map<std::string, file_cache> ConfigFileCache;
/** A hash of commands used by the core
*/
-typedef nspace::hash_map<std::string,Command*> Commandtable;
+#ifdef HASHMAP_DEPRECATED
+ typedef nspace::hash_map<std::string, Command*, nspace::insensitive, irc::StrHashComp> Commandtable;
+#else
+ typedef nspace::hash_map<std::string, Command*, nspace::hash<std::string>, irc::StrHashComp> Commandtable;
+#endif
/** Membership list of a channel */
typedef std::map<User*, Membership*> UserMembList;