summaryrefslogtreecommitdiff
path: root/modules/database/db_old.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-04-23 05:07:06 -0400
committerAdam <Adam@anope.org>2012-04-23 05:07:06 -0400
commit63c639e108a00d7dbb0d7ac9891684fc83a3b207 (patch)
treefed97c3c2eb8cc0847aaf94db24e885b72de3413 /modules/database/db_old.cpp
parentfc00406079860043408499e26e9d8fcad49bffd6 (diff)
Fixed hashm checking in db_old and loading 1.9.1 databases
Diffstat (limited to 'modules/database/db_old.cpp')
-rw-r--r--modules/database/db_old.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp
index 7e173526a..c455aa265 100644
--- a/modules/database/db_old.cpp
+++ b/modules/database/db_old.cpp
@@ -620,7 +620,9 @@ static void LoadBots()
READ(read_int32(&created, f));
READ(read_int16(&chancount, f));
- BotInfo *bi = new BotInfo(nick, user, host, real);
+ BotInfo *bi = findbot(nick);
+ if (!bi)
+ bi = new BotInfo(nick, user, host, real);
bi->created = created;
if (flags & OLD_BI_PRIVATE)
@@ -1005,7 +1007,7 @@ class DBOld : public Module
ConfigReader conf;
hashm = conf.ReadValue("db_old", "hash", "", 0);
- if (hashm != "md5" && hashm != "oldmd5" && hashm == "sha1" && hashm == "plain")
+ if (hashm != "md5" && hashm != "oldmd5" && hashm != "sha1" && hashm != "plain" && hashm != "sha256")
throw ModuleException("Invalid hash method");
}