summaryrefslogtreecommitdiff
path: root/src/botserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-01-15 16:11:31 -0500
committerAdam <Adam@anope.org>2011-01-15 16:11:31 -0500
commitc669820481b8c431f4238d6b2d958e9dbfec411a (patch)
treeeaa7e25756bed697553db9529cb490dc954a73a3 /src/botserv.cpp
parentecc2fc6029567d1d2f4d02d36bf64216ae9a03ee (diff)
Added an amsg kicker
Diffstat (limited to 'src/botserv.cpp')
-rw-r--r--src/botserv.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/botserv.cpp b/src/botserv.cpp
index 6eaa330c9..78e29451a 100644
--- a/src/botserv.cpp
+++ b/src/botserv.cpp
@@ -16,9 +16,6 @@
static UserData *get_user_data(Channel *c, User *u);
-static void check_ban(ChannelInfo *ci, User *u, int ttbtype);
-static void bot_kick(ChannelInfo *ci, User *u, LanguageString message, ...);
-
E void moduleAddBotServCmds();
/*************************************************************************/
@@ -116,6 +113,11 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
Allow = true;
else if (ci->botflags.HasFlag(BS_DONTKICKVOICES) && ci->c->HasUserStatus(u, CMODE_VOICE))
Allow = true;
+
+ EventReturn MOD_RESULT;
+ FOREACH_RESULT(I_OnPrivmsg, OnPrivmsg(u, ci, realbuf, Allow));
+ if (MOD_RESULT == EVENT_STOP)
+ return;
if (!check_access(u, ci, CA_NOKICK) && Allow)
{
@@ -452,7 +454,7 @@ static UserData *get_user_data(Channel *c, User *u)
* @param u The user
* @param ttbtype The type of bot kicker the user should be checked against
*/
-static void check_ban(ChannelInfo *ci, User *u, int ttbtype)
+void check_ban(ChannelInfo *ci, User *u, int ttbtype)
{
BanData *bd = get_ban_data(ci->c, u);
@@ -485,7 +487,7 @@ static void check_ban(ChannelInfo *ci, User *u, int ttbtype)
/* This makes a bot kick an user. Works somewhat like notice_lang in fact ;) */
-static void bot_kick(ChannelInfo *ci, User *u, LanguageString message, ...)
+void bot_kick(ChannelInfo *ci, User *u, LanguageString message, ...)
{
va_list args;
char buf[1024];