/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2015 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2017-2019 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2014-2016, 2018 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2012 Robby <robby@chatbelgie.be>
* Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- * Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
+ * Copyright (C) 2007, 2010 Craig Edwards <brain@inspircd.org>
+ * Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
if (it == setexts.end())
continue;
- std::string value = item->serialize(FORMAT_INTERNAL, extensible, it->second);
+ std::string value = item->ToInternal(extensible, it->second);
// If the serialized value is empty the extension won't be saved and restored
if (!value.empty())
extdata.push_back(InstanceData(index, value));
for (std::vector<InstanceData>::const_iterator i = list.begin(); i != list.end(); ++i)
{
const InstanceData& id = *i;
- handledexts[id.index].extitem->unserialize(FORMAT_INTERNAL, extensible, id.serialized);
+ handledexts[id.index].extitem->FromInternal(extensible, id.serialized);
}
}
ReloadModule::DataKeeper datakeeper;
datakeeper.Save(mod);
- DLLManager* dll = mod->ModuleDLLManager;
std::string name = mod->ModuleSourceFile;
ServerInstance->Modules->DoSafeUnload(mod);
ServerInstance->GlobalCulls.Apply();
- delete dll;
bool result = ServerInstance->Modules->Load(name);
if (result)
}
}
-COMMAND_INIT(CommandReloadmodule)
+class CoreModReloadmodule : public Module
+{
+ private:
+ CommandReloadmodule cmd;
+
+ public:
+ CoreModReloadmodule()
+ : cmd(this)
+ {
+ }
+
+ Version GetVersion() CXX11_OVERRIDE
+ {
+ return Version("Provides the RELOADMODULE command", VF_CORE | VF_VENDOR);
+ }
+};
+
+MODULE_INIT(CoreModReloadmodule)