From e1d460e2114295dc7a23de45c68fe2e8a4102ce8 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 9 Oct 2013 16:27:16 -0400 Subject: [PATCH] Call OnBotPrivmsg after checking if the message is a ctcp, not before. fix typo in opersrev.example.conf --- data/operserv.example.conf | 2 +- src/messages.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/operserv.example.conf b/data/operserv.example.conf index d53337258..49c7b99c4 100644 --- a/data/operserv.example.conf +++ b/data/operserv.example.conf @@ -598,7 +598,7 @@ module #sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits." /* - * If set and is not 0, this directive tells Services to add an AKILL the number of subsequent kills + * If set and is not 0, this directive tells Services to add an AKILL if the number of subsequent kills * for the same host exceeds this value, preventing the network from experiencing KILL floods. * * This directive is optional. diff --git a/src/messages.cpp b/src/messages.cpp index 67f669a43..0e7d03ce1 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -330,11 +330,6 @@ void Privmsg::Run(MessageSource &source, const std::vector ¶m if (bi) { - EventReturn MOD_RESULT; - FOREACH_RESULT(OnBotPrivmsg, MOD_RESULT, (u, bi, message)); - if (MOD_RESULT == EVENT_STOP) - return; - if (message[0] == '\1' && message[message.length() - 1] == '\1') { if (message.substr(0, 6).equals_ci("\1PING ")) @@ -351,6 +346,11 @@ void Privmsg::Run(MessageSource &source, const std::vector ¶m } return; } + + EventReturn MOD_RESULT; + FOREACH_RESULT(OnBotPrivmsg, MOD_RESULT, (u, bi, message)); + if (MOD_RESULT == EVENT_STOP) + return; bi->OnMessage(u, message); }