]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
cmd_invite Extend scope of the prefix character variable
[user/henk/code/inspircd.git] / src / modules.cpp
index 3ff8aad145f3aec69cfb973617e6bd418822f95d..d77221c39f847b975f7c0af38c1c47ee635d3782 100644 (file)
@@ -451,26 +451,6 @@ namespace
                        ServerInstance->GlobalCulls.AddItem(this);
                }
        };
-
-       struct ReloadAction : public HandlerBase0<void>
-       {
-               Module* const mod;
-               HandlerBase1<void, bool>* const callback;
-               ReloadAction(Module* m, HandlerBase1<void, bool>* c)
-                       : mod(m), callback(c) {}
-               void Call()
-               {
-                       DLLManager* dll = mod->ModuleDLLManager;
-                       std::string name = mod->ModuleSourceFile;
-                       ServerInstance->Modules->DoSafeUnload(mod);
-                       ServerInstance->GlobalCulls.Apply();
-                       delete dll;
-                       bool rv = ServerInstance->Modules->Load(name);
-                       if (callback)
-                               callback->Call(rv);
-                       ServerInstance->GlobalCulls.AddItem(this);
-               }
-       };
 }
 
 bool ModuleManager::Unload(Module* mod)
@@ -481,14 +461,6 @@ bool ModuleManager::Unload(Module* mod)
        return true;
 }
 
-void ModuleManager::Reload(Module* mod, HandlerBase1<void, bool>* callback)
-{
-       if (CanUnload(mod))
-               ServerInstance->AtomicActions.AddAction(new ReloadAction(mod, callback));
-       else if (callback)
-               callback->Call(false);
-}
-
 void ModuleManager::LoadAll()
 {
        std::map<std::string, ServiceList> servicemap;
@@ -556,21 +528,6 @@ void ModuleManager::AddService(ServiceProvider& item)
 {
        switch (item.service)
        {
-               case SERVICE_COMMAND:
-                       if (!ServerInstance->Parser.AddCommand(static_cast<Command*>(&item)))
-                               throw ModuleException("Command "+std::string(item.name)+" already exists.");
-                       return;
-               case SERVICE_MODE:
-               {
-                       ModeHandler* mh = static_cast<ModeHandler*>(&item);
-                       ServerInstance->Modes->AddMode(mh);
-                       AddReferent((mh->GetModeType() == MODETYPE_CHANNEL ? "mode/" : "umode/") + item.name, &item);
-                       return;
-               }
-               case SERVICE_METADATA:
-                       if (!ServerInstance->Extensions.Register(static_cast<ExtensionItem*>(&item)))
-                               throw ModuleException("Extension " + std::string(item.name) + " already exists.");
-                       return;
                case SERVICE_DATA:
                case SERVICE_IOHOOK:
                {