diff options
author | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
commit | 26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch) | |
tree | b9916f14fe35ce5c4de95c4194ca4ea0cb30812f /src/command.cpp | |
parent | 0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff) |
New event system
Diffstat (limited to 'src/command.cpp')
-rw-r--r-- | src/command.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/command.cpp b/src/command.cpp index 6aa2f744b..5241e9316 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -17,6 +17,7 @@ #include "access.h" #include "regchannel.h" #include "channels.h" +#include "event.h" CommandSource::CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *r, BotInfo *bi) : nick(n), u(user), nc(core), reply(r), c(NULL), service(bi) @@ -261,7 +262,7 @@ void Command::Run(CommandSource &source, const Anope::string &message) source.permission = info.permission; EventReturn MOD_RESULT; - FOREACH_RESULT(OnPreCommand, MOD_RESULT, (source, c, params)); + MOD_RESULT = Event::OnPreCommand(&Event::PreCommand::OnPreCommand, source, c, params); if (MOD_RESULT == EVENT_STOP) return; @@ -281,7 +282,7 @@ void Command::Run(CommandSource &source, const Anope::string &message) } c->Execute(source, params); - FOREACH_MOD(OnPostCommand, (source, c, params)); + Event::OnPostCommand(&Event::PostCommand::OnPostCommand, source, c, params); } bool Command::FindCommandFromService(const Anope::string &command_service, BotInfo* &bot, Anope::string &name) |