From a507816701d136a1c22d2f6779d811840d61577c Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 30 Nov 2010 17:25:42 -0500 Subject: Fixed looking up users to use case insensitivity --- src/bots.cpp | 2 +- src/hashcomp.cpp | 15 +++++++++++++++ src/users.cpp | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bots.cpp b/src/bots.cpp index 09742acff..098404ceb 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -9,7 +9,7 @@ #include "modules.h" #include "commands.h" -patricia_tree > BotListByNick; +patricia_tree BotListByNick; patricia_tree BotListByUID; BotInfo *BotServ = NULL; diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 5f65738ea..d50fca3c0 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -87,6 +87,11 @@ const char *irc::irc_char_traits::find(const char *s1, int n, char c) return n >= 0 ? s1 : NULL; } +const char irc::irc_char_traits::chartolower(char c1) +{ + return rfc_case_insensitive_map[static_cast(c1)]; +} + /* VS 2008 specific function */ bool irc::hash::operator()(const Anope::string &s1, const Anope::string &s2) const { @@ -153,6 +158,11 @@ const char *ci::ci_char_traits::find(const char *s1, int n, char c) return n >= 0 ? s1 : NULL; } +const char ci::ci_char_traits::chartolower(char c1) +{ + return ascii_case_insensitive_map[static_cast(c1)]; +} + /* VS 2008 specific function */ bool ci::hash::operator()(const Anope::string &s1, const Anope::string &s2) const { @@ -178,6 +188,11 @@ size_t ci::hash::operator()(const Anope::string &s) const return operator()(s.ci_str()); } +const char std::std_char_traits::chartolower(char c1) +{ + return c1; +} + /** Compare two Anope::strings as ci::strings * @param s1 The first string * @param s2 The second string diff --git a/src/users.cpp b/src/users.cpp index 58d931789..f6c0983ef 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -12,7 +12,7 @@ #include "services.h" #include "modules.h" -patricia_tree > UserListByNick; +patricia_tree UserListByNick; patricia_tree UserListByUID; int32 opcnt = 0; -- cgit