diff options
Diffstat (limited to 'modules/database/db_old.cpp')
-rw-r--r-- | modules/database/db_old.cpp | 6 |
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"); } |