summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-24 23:15:08 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-24 23:15:08 +0000
commit47504c9de5accda45a19627fd2b6ec13baa6ba95 (patch)
treed3d983aec4829d490f83a2e151e0de1e20554114
parent0ed0fa4af62554a7281d403b6895b29e198e8186 (diff)
Fixed db-convert and enc_old to work when converting databases using enc_old
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2776 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--src/core/enc_old.c6
-rw-r--r--src/tools/db-convert.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/enc_old.c b/src/core/enc_old.c
index c5324a55b..a04ec75e9 100644
--- a/src/core/enc_old.c
+++ b/src/core/enc_old.c
@@ -348,7 +348,7 @@ class EOld : public Module
char digest[33], digest2[33];
char cpass[1000];
int i;
- std::string buf = "old:";
+ std::string buf = "oldmd5:";
memset(&context, 0, sizeof(context));
memset(&digest, 0, sizeof(digest));
@@ -374,14 +374,14 @@ class EOld : public Module
EventReturn OnDecrypt(const std::string &hashm, const std::string &src, std::string &dest )
{
- if (hashm != "old")
+ if (hashm != "oldmd5")
return EVENT_CONTINUE;
return EVENT_STOP;
}
EventReturn OnCheckPassword(const std::string &hashm, std::string &plaintext, std::string &password)
{
- if (hashm != "old")
+ if (hashm != "oldmd5")
return EVENT_CONTINUE;
std::string buf;
this->OnEncrypt(plaintext, buf);
diff --git a/src/tools/db-convert.c b/src/tools/db-convert.c
index ebca084fd..9494b1b37 100644
--- a/src/tools/db-convert.c
+++ b/src/tools/db-convert.c
@@ -376,14 +376,14 @@ int main(int argc, char *argv[])
len = 16;
else if (hashm == "sha1")
len = 20;
- else if (hashm == "old")
+ else if (hashm == "oldmd5")
len = 16;
else
len = 32;
b64_encode(nc->pass, len, (char *)cpass, 5000);
- fs << "NC " << nc->display << " " << hashm << ":" << cpass << " ";
+ fs << "NC " << nc->display << " " << hashm << ":" << cpass;
fs << " " << GetLanguageID(nc->language) << " " << nc->memos.memomax << " " << nc->channelcount << std::endl;
std::cout << "Wrote account for " << nc->display << " passlen " << strlen(cpass) << std::endl;