summaryrefslogtreecommitdiff
path: root/src/core/db_plain.cpp
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-09 08:49:00 +0000
committerDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-09 08:49:00 +0000
commit5e62e8f22e94c975159e1800732cb2740c18d50b (patch)
treef3551b11b8a21f36afa8f5d8b594536e4ccc7b9c /src/core/db_plain.cpp
parenta4b015b39d0e232121e060466a979277f0f28ce2 (diff)
changed all password fields to std::string and reworked the way how the enc modules handle the passwords
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2740 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/db_plain.cpp')
-rw-r--r--src/core/db_plain.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/db_plain.cpp b/src/core/db_plain.cpp
index 5cc6ab42b..3d220516c 100644
--- a/src/core/db_plain.cpp
+++ b/src/core/db_plain.cpp
@@ -388,12 +388,7 @@ static void LoadNickCore(const std::vector<std::string> &params)
return;
}
- size_t tmp = params[1].find(':'); // XXX till we store the hash method internally with the nickcore
- const char *pass = params[1].c_str() + tmp + 1;
- char passbuf[PASSMAX];
- memset(&passbuf, 0, sizeof(passbuf));
- b64_decode(pass, passbuf, PASSMAX);
- strscpy(nc->pass, passbuf, PASSMAX);
+ nc->pass.assign(params[1]);
for (int i = 0; LangInfos[i].LanguageId != -1; ++i)
if (params[2] == LangInfos[i].Name)
@@ -854,10 +849,7 @@ class DBPlain : public Module
}
else
{
- //XXX forced plain till we store hashm in pw
- char temppass[5000];
- b64_encode(nc->pass, strlen(nc->pass), temppass, 5000);
- db << "NC " << nc->display << " plain:" << temppass << " ";
+ db << "NC " << nc->display << " " << nc->pass << " ";
}
for (j = 0; LangInfos[j].LanguageId != -1; ++j)
if (nc->language == LangInfos[j].LanguageId)