summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-05 21:09:55 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-05 21:09:55 +0000
commit4c09dec19754390d5542b8a4847d0dc081d2514b (patch)
treefed6e62faa61bb5db7854d6c44b50431d3204ea7 /src
parentb3ba32d08abd60cdc4a71c04e716a0fea0942055 (diff)
Make hash algo names case insensitive
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5873 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_oper_hash.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp
index 6f0684643..036bbed1b 100644
--- a/src/modules/m_oper_hash.cpp
+++ b/src/modules/m_oper_hash.cpp
@@ -32,10 +32,10 @@ using namespace std;
class cmd_mkpasswd : public command_t
{
Module* Sender;
- std::map<std::string, Module*> &hashers;
+ std::map<irc::string, Module*> &hashers;
std::deque<std::string> &names;
public:
- cmd_mkpasswd (InspIRCd* Instance, Module* S, std::map<std::string, Module*> &h, std::deque<std::string> &n)
+ cmd_mkpasswd (InspIRCd* Instance, Module* S, std::map<irc::string, Module*> &h, std::deque<std::string> &n)
: command_t(Instance,"MKPASSWD", 'o', 2), Sender(S), hashers(h), names(n)
{
this->source = "m_oper_hash.so";
@@ -44,7 +44,7 @@ class cmd_mkpasswd : public command_t
void MakeHash(userrec* user, const char* algo, const char* stuff)
{
- std::map<std::string, Module*>::iterator x = hashers.find(algo);
+ std::map<irc::string, Module*>::iterator x = hashers.find(algo);
if (x != hashers.end())
{
HashResetRequest(Sender, x->second).Send();
@@ -72,7 +72,7 @@ class ModuleOperHash : public Module
cmd_mkpasswd* mycommand;
ConfigReader* Conf;
- std::map<std::string, Module*> hashers;
+ std::map<irc::string, Module*> hashers;
std::deque<std::string> names;
modulelist* ml;
@@ -93,7 +93,7 @@ class ModuleOperHash : public Module
for (modulelist::iterator m = ml->begin(); m != ml->end(); m++)
{
std::string name = HashNameRequest(this, *m).Send();
- hashers[name] = *m;
+ hashers[name.c_str()] = *m;
names.push_back(name);
ServerInstance->Log(DEBUG, "Found HashRequest interface: '%s' -> '%08x'", name.c_str(), *m);
}
@@ -123,7 +123,7 @@ class ModuleOperHash : public Module
virtual int OnOperCompare(const std::string &data, const std::string &input, int tagnumber)
{
std::string hashtype = Conf->ReadValue("oper", "hash", tagnumber);
- std::map<std::string, Module*>::iterator x = hashers.find(hashtype);
+ std::map<irc::string, Module*>::iterator x = hashers.find(hashtype.c_str());
if (x != hashers.end())
{