diff options
| author | 2010-01-18 23:49:23 +0000 | |
|---|---|---|
| committer | 2010-01-18 23:49:23 +0000 | |
| commit | dce58b1611e275118d418bfb3b4402bd14d279dd (patch) | |
| tree | e0c036dd49d629b7add3f079c17851198270f404 /src/modules/m_spanningtree/main.cpp | |
| parent | Include total CPU usage in STATS z (diff) | |
Move lots of spanningtree items to commands
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12296 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 18f399bbf..7ac67221b 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -30,17 +30,34 @@ ModuleSpanningTree::ModuleSpanningTree() { Utils = new SpanningTreeUtilities(this); - command_rconnect = new CommandRConnect(this, Utils); - command_rsquit = new CommandRSQuit(this, Utils); - command_svsjoin = new CommandSVSJoin(this); - command_svspart = new CommandSVSPart(this); - command_svsnick = new CommandSVSNick(this); + commands = new SpanningTreeCommands(this); +} + +SpanningTreeCommands::SpanningTreeCommands(ModuleSpanningTree* module) + : rconnect(module, module->Utils), rsquit(module, module->Utils), + svsjoin(module), svspart(module), svsnick(module), metadata(module), + uid(module), opertype(module), fjoin(module), fmode(module), ftopic(module), + fhost(module), fident(module), fname(module) +{ +} + +void ModuleSpanningTree::init() +{ RefreshTimer = new CacheRefreshTimer(Utils); - ServerInstance->AddCommand(command_rconnect); - ServerInstance->AddCommand(command_rsquit); - ServerInstance->AddCommand(command_svsjoin); - ServerInstance->AddCommand(command_svspart); - ServerInstance->AddCommand(command_svsnick); + ServerInstance->Modules->AddService(commands->rconnect); + ServerInstance->Modules->AddService(commands->rsquit); + ServerInstance->Modules->AddService(commands->svsjoin); + ServerInstance->Modules->AddService(commands->svspart); + ServerInstance->Modules->AddService(commands->svsnick); + ServerInstance->Modules->AddService(commands->metadata); + ServerInstance->Modules->AddService(commands->uid); + ServerInstance->Modules->AddService(commands->opertype); + ServerInstance->Modules->AddService(commands->fjoin); + ServerInstance->Modules->AddService(commands->fmode); + ServerInstance->Modules->AddService(commands->ftopic); + ServerInstance->Modules->AddService(commands->fhost); + ServerInstance->Modules->AddService(commands->fident); + ServerInstance->Modules->AddService(commands->fname); ServerInstance->Timers->AddTimer(RefreshTimer); Implementation eventlist[] = @@ -898,11 +915,7 @@ ModuleSpanningTree::~ModuleSpanningTree() /* This will also free the listeners */ delete Utils; - delete command_rconnect; - delete command_rsquit; - delete command_svsjoin; - delete command_svspart; - delete command_svsnick; + delete commands; } Version ModuleSpanningTree::GetVersion() |
