From f4472dd6dcdfbb5d4a2a50ddc615644c3b2c8145 Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 3 Sep 2009 02:30:12 +0000 Subject: Change cmd_*.so to use the Module object API Create Module* objects for each command, and load them like modules. This unifies the external API for modules. Library directory is now deprecated: all modules are located in a single module directory. Header files for each command are no longer needed; remove. This also fixes two potential segfaults in m_spanningtree. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11668 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_whowas.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/commands/cmd_whowas.cpp') diff --git a/src/commands/cmd_whowas.cpp b/src/commands/cmd_whowas.cpp index 1109b4d8b..5e77671a6 100644 --- a/src/commands/cmd_whowas.cpp +++ b/src/commands/cmd_whowas.cpp @@ -16,12 +16,7 @@ WhoWasMaintainTimer * timer; -extern "C" DllExport Command* init_command(InspIRCd* Instance) -{ - return new CommandWhowas(Instance); -} - -CommandWhowas::CommandWhowas(InspIRCd* Instance) : Command(Instance, NULL, "WHOWAS", 0, 1, false, 2) +CommandWhowas::CommandWhowas(InspIRCd* Instance, Module* parent) : Command(Instance,parent, "WHOWAS", 0, 1, false, 2) { syntax = "{,}"; timer = new WhoWasMaintainTimer(Instance, 3600); @@ -335,3 +330,5 @@ void WhoWasMaintainTimer::Tick(time_t) whowas_command->HandleInternal(WHOWAS_MAINTAIN, params); } } + +COMMAND_INIT(CommandWhowas) -- cgit v1.3.1-10-gc9f91