diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-03 02:30:12 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-03 02:30:12 +0000 |
commit | f4472dd6dcdfbb5d4a2a50ddc615644c3b2c8145 (patch) | |
tree | df27c8b3070c1fe4f285259f925de9fabe31b8a5 /src/commands/cmd_whowas.cpp | |
parent | c29175d8064b3428685da1155704b6c54c116b94 (diff) |
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
Diffstat (limited to 'src/commands/cmd_whowas.cpp')
-rw-r--r-- | src/commands/cmd_whowas.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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 = "<nick>{,<nick>}"; timer = new WhoWasMaintainTimer(Instance, 3600); @@ -335,3 +330,5 @@ void WhoWasMaintainTimer::Tick(time_t) whowas_command->HandleInternal(WHOWAS_MAINTAIN, params); } } + +COMMAND_INIT(CommandWhowas) |