]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_reloadmodule.cpp
When silence mask is prefixed by + or -, it should only remove the first character...
[user/henk/code/inspircd.git] / src / coremods / core_reloadmodule.cpp
index 383d574bfe3c077798d22c24116532cf36378e91..06648fcb2e2e0b138b86ca50bb7de090d895db7b 100644 (file)
@@ -379,7 +379,7 @@ void DataKeeper::SaveExtensions(Extensible* extensible, std::vector<InstanceData
                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));
@@ -597,7 +597,7 @@ void DataKeeper::RestoreExtensions(const std::vector<InstanceData>& list, Extens
        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);
        }
 }
 
@@ -765,4 +765,21 @@ CmdResult CommandReloadmodule::Handle(User* user, const Params& parameters)
        }
 }
 
-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)