From 4b97a9b13f2aa2b27e1ecd050db3b94f9b40ac77 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 3 Nov 2016 22:54:35 -0400 Subject: Fix crash loading enc_old prior to the proto mods --- modules/encryption/enc_old.cpp | 2 +- src/users.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/encryption/enc_old.cpp b/modules/encryption/enc_old.cpp index 7c751df93..7346132f9 100644 --- a/modules/encryption/enc_old.cpp +++ b/modules/encryption/enc_old.cpp @@ -45,7 +45,7 @@ class EOld : public Module oldmd5provider(this) { - ModuleManager::LoadModule("enc_md5", User::Find(creator)); + ModuleManager::LoadModule("enc_md5", User::Find(creator, true)); if (!md5) throw ModuleException("Unable to find md5 reference"); diff --git a/src/users.cpp b/src/users.cpp index 264f5ceba..25e558c5f 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -816,7 +816,7 @@ bool User::BadPassword() User* User::Find(const Anope::string &name, bool nick_only) { - if (!nick_only && IRCD->RequiresID) + if (!nick_only && IRCD && IRCD->RequiresID) { user_map::iterator it = UserListByUID.find(name); if (it != UserListByUID.end()) -- cgit From 0f49d1051a96645a576e49cb025198d1b5c9dc60 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 3 Nov 2016 22:58:50 -0400 Subject: Don't try to include files with empty paths --- src/config.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index c9a4a53c8..e821ac099 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -709,6 +709,9 @@ Anope::string File::Read() void Conf::LoadConf(File &file) { + if (file.GetName().empty()) + return; + if (!file.Open()) throw ConfigException("File " + file.GetName() + " could not be opened."); -- cgit