diff options
| author | Adam <Adam@anope.org> | 2011-01-15 16:11:31 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-01-15 16:11:31 -0500 |
| commit | c669820481b8c431f4238d6b2d958e9dbfec411a (patch) | |
| tree | eaa7e25756bed697553db9529cb490dc954a73a3 /include | |
| parent | ecc2fc6029567d1d2f4d02d36bf64216ae9a03ee (diff) | |
Added an amsg kicker
Diffstat (limited to 'include')
| -rw-r--r-- | include/extern.h | 2 | ||||
| -rw-r--r-- | include/language.h | 5 | ||||
| -rw-r--r-- | include/modules.h | 11 | ||||
| -rw-r--r-- | include/services.h | 6 |
4 files changed, 22 insertions, 2 deletions
diff --git a/include/extern.h b/include/extern.h index f32520c44..b2e33dd83 100644 --- a/include/extern.h +++ b/include/extern.h @@ -52,6 +52,8 @@ E BotInfo *findbot(const Anope::string &nick); */ E Anope::string normalizeBuffer(const Anope::string &); +E void check_ban(ChannelInfo *ci, User *u, int ttbtype); +E void bot_kick(ChannelInfo *ci, User *u, LanguageString message, ...); E void bot_raw_ban(User *requester, ChannelInfo *ci, const Anope::string &nick, const Anope::string &reason); E void bot_raw_kick(User *requester, ChannelInfo *ci, const Anope::string &nick, const Anope::string &reason); diff --git a/include/language.h b/include/language.h index 03c8698b3..c61a870d9 100644 --- a/include/language.h +++ b/include/language.h @@ -725,6 +725,7 @@ enum LanguageString BOT_REASON_REVERSE, BOT_REASON_UNDERLINE, BOT_REASON_ITALIC, + BOT_REASON_AMSGS, BOT_BOT_SYNTAX, BOT_BOT_ALREADY_EXISTS, BOT_BOT_CREATION_FAILED, @@ -846,6 +847,9 @@ enum LanguageString BOT_KICK_ITALICS_ON, BOT_KICK_ITALICS_ON_BAN, BOT_KICK_ITALICS_OFF, + BOT_KICK_AMSGS_ON, + BOT_KICK_AMSGS_ON_BAN, + BOT_KICK_AMSGS_OFF, BOT_BADWORDS_SYNTAX, BOT_BADWORDS_DISABLED, BOT_BADWORDS_REACHED_LIMIT, @@ -1504,6 +1508,7 @@ enum LanguageString BOT_HELP_KICK_REPEAT, BOT_HELP_KICK_BADWORDS, BOT_HELP_KICK_ITALICS, + BOT_HELP_KICK_AMSGS, BOT_HELP_BADWORDS, BOT_HELP_SAY, BOT_HELP_ACT, diff --git a/include/modules.h b/include/modules.h index ae5bbeee3..fd032fe87 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1056,6 +1056,15 @@ class CoreExport Module : public Extensible * @return EVENT_STOP to halt processing */ virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, const Anope::string &message) { return EVENT_CONTINUE; } + + /** Called when we receive a PRIVMSG for a registered channel we are in + * @param u The source of the message + * @param ci The channel + * @param msg The message + * @param Allow set to false to make the flood kickers halt + * @return MOD_STOP to stop processing completely + */ + virtual EventReturn OnPrivmsg(User *u, ChannelInfo *ci, Anope::string &msg, bool &Allow) { return EVENT_CONTINUE; } }; /** Implementation-specific flags which may be set in ModuleManager::Attach() @@ -1108,7 +1117,7 @@ enum Implementation I_OnServerQuit, I_OnTopicUpdated, I_OnEncrypt, I_OnEncryptCheckLen, I_OnDecrypt, I_OnCheckPassword, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnUserModeSet, I_OnUserModeUnset, I_OnChannelModeAdd, I_OnUserModeAdd, - I_OnMLock, I_OnUnMLock, I_OnServerSync, I_OnUplinkSync, I_OnBotPrivmsg, + I_OnMLock, I_OnUnMLock, I_OnServerSync, I_OnUplinkSync, I_OnBotPrivmsg, I_OnPrivmsg, I_END }; diff --git a/include/services.h b/include/services.h index 5db510fde..80160d676 100644 --- a/include/services.h +++ b/include/services.h @@ -734,6 +734,8 @@ enum BotServFlag BS_KICK_REPEAT, /* BotServ kicks for italics */ BS_KICK_ITALICS, + /* BotServ kicks for amsgs */ + BS_KICK_AMSGS, /* Send fantasy replies back to the channel via PRIVMSG */ BS_MSG_PRIVMSG, /* Send fantasy replies back to the channel via NOTICE */ @@ -746,7 +748,8 @@ enum BotServFlag const Anope::string BotServFlagStrings[] = { "BS_BEGIN", "BS_DONTKICKOPS", "BS_DONTKICKVOICES", "BS_FANTASY", "BS_SYMBIOSIS", "BS_GREET", "BS_NOBOT", "BS_KICK_BOLDs", "BS_KICK_COLORS", "BS_KICK_REVERSES", "BS_KICK_UNDERLINES", "BS_KICK_BADWORDS", "BS_KICK_CAPS", - "BS_KICK_FLOOD", "BS_KICK_REPEAT", "BS_KICK_ITALICS", "BS_MSG_PRIVMSG", "BS_MSG_NOTICE", "BS_MSG_NOTICEOPS", "" + "BS_KICK_FLOOD", "BS_KICK_REPEAT", "BS_KICK_ITALICS", "BS_KICK_AMSGS", "BS_MSG_PRIVMSG", "BS_MSG_NOTICE", + "BS_MSG_NOTICEOPS", "" }; /* Indices for TTB (Times To Ban) */ @@ -761,6 +764,7 @@ enum TTB_FLOOD, TTB_REPEAT, TTB_ITALICS, + TTB_AMSGS, TTB_SIZE }; |
