summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_md5.cpp3
-rw-r--r--src/modules/m_oper_hash.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp
index a753ef577..f8ccda26b 100644
--- a/src/modules/m_md5.cpp
+++ b/src/modules/m_md5.cpp
@@ -292,6 +292,7 @@ class ModuleMD5 : public Module
virtual char* OnRequest(Request* request)
{
HashRequest* MD5 = (HashRequest*)request;
+ ServerInstance->Log(DEBUG,"MD5 REQUEST type %s", request->GetId());
if (strcmp("KEY", request->GetId()) == 0)
{
this->key = (unsigned int*)MD5->GetKeyData();
@@ -302,12 +303,14 @@ class ModuleMD5 : public Module
}
else if (strcmp("SUM", request->GetId()) == 0)
{
+ ServerInstance->Log(DEBUG,"MD5 SUM!");
static char data[MAXBUF];
GenHash((const char*)MD5->GetHashData(), data, chars ? chars : "0123456789abcdef", key);
return data;
}
else if (strcmp("RESET", request->GetId()) == 0)
{
+ ServerInstance->Log(DEBUG,"MD5 RESET!");
this->chars = NULL;
this->key = NULL;
}
diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp
index e070bfc87..de6b3f993 100644
--- a/src/modules/m_oper_hash.cpp
+++ b/src/modules/m_oper_hash.cpp
@@ -51,7 +51,7 @@ class cmd_mkpasswd : public command_t
void MakeHash(userrec* user, Module* ProviderMod, const char* algo, const char* stuff)
{
- HashResetRequest(Sender, ProviderMod);
+ HashResetRequest(Sender, ProviderMod).Send();
user->WriteServ("NOTICE %s :%s hashed password for %s is %s",user->nick, algo, stuff, HashSumRequest(Sender, ProviderMod, stuff).Send() );
}
@@ -67,7 +67,7 @@ class cmd_mkpasswd : public command_t
}
else
{
- user->WriteServ("NOTICE %s :Unknown hash type, valid hash types are:%s%s", (Prov & PROV_MD5) > 0 ? " MD5" : "", (Prov & PROV_SHA) > 0 ? " SHA256" : "");
+ user->WriteServ("NOTICE %s :Unknown hash type, valid hash types are:%s%s", user->nick, ((Prov & PROV_MD5) > 0) ? " MD5" : "", ((Prov & PROV_SHA) > 0) ? " SHA256" : "");
}
/* NOTE: Don't propogate this across the network!
@@ -93,6 +93,7 @@ class ModuleOperHash : public Module
ModuleOperHash(InspIRCd* Me)
: Module::Module(Me)
{
+ ID = 0;
Conf = NULL;
OnRehash("");