diff options
author | Adam <Adam@anope.org> | 2011-01-18 18:41:16 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-01-18 18:41:16 -0500 |
commit | 34c6c664c9ef5d080475642dac8a7796e7f40044 (patch) | |
tree | 0d2852e172f222a3512e0bff0f6ecdacee474c0e | |
parent | 4a3ee91c5523b643dc7f7a05b70934e87f7ff0a4 (diff) |
Added amsg kicker settings to /bs info
-rw-r--r-- | include/language.h | 2 | ||||
-rw-r--r-- | modules/core/bs_info.cpp | 10 | ||||
-rw-r--r-- | modules/core/bs_kick.cpp | 2 | ||||
-rw-r--r-- | src/language.cpp | 4 |
4 files changed, 17 insertions, 1 deletions
diff --git a/include/language.h b/include/language.h index a0d728772..cf3b8f44b 100644 --- a/include/language.h +++ b/include/language.h @@ -783,6 +783,8 @@ enum LanguageString BOT_INFO_CHAN_KICK_UNDERLINES_BAN, BOT_INFO_CHAN_KICK_ITALICS, BOT_INFO_CHAN_KICK_ITALICS_BAN, + BOT_INFO_CHAN_KICK_AMSGS, + BOT_INFO_CHAN_KICK_AMSGS_BAN, BOT_INFO_CHAN_MSG, BOT_INFO_ACTIVE, BOT_INFO_INACTIVE, diff --git a/modules/core/bs_info.cpp b/modules/core/bs_info.cpp index 7da063b5c..f9dc499ed 100644 --- a/modules/core/bs_info.cpp +++ b/modules/core/bs_info.cpp @@ -162,6 +162,16 @@ class CommandBSInfo : public Command } else source.Reply(BOT_INFO_CHAN_KICK_ITALICS, GetString(u, BOT_INFO_INACTIVE).c_str()); + if (ci->botflags.HasFlag(BS_KICK_AMSGS)) + { + if (ci->ttb[TTB_AMSGS]) + source.Reply(BOT_INFO_CHAN_KICK_AMSGS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_AMSGS]); + else + source.Reply(BOT_INFO_CHAN_KICK_AMSGS, GetString(u, BOT_INFO_ACTIVE).c_str()); + } + else + source.Reply(BOT_INFO_CHAN_KICK_AMSGS, GetString(u, BOT_INFO_INACTIVE).c_str()); + if (ci->botflags.HasFlag(BS_MSG_PRIVMSG)) source.Reply(BOT_INFO_CHAN_MSG, "PRIVMSG"); else if (ci->botflags.HasFlag(BS_MSG_NOTICE)) diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp index fef71e9f6..eba5de508 100644 --- a/modules/core/bs_kick.cpp +++ b/modules/core/bs_kick.cpp @@ -471,7 +471,7 @@ class BSKick : public Module Channel *c = (*it)->chan; ++it; - if (c->ci != NULL) + if (c->ci != NULL && c->ci->botflags.HasFlag(BS_KICK_AMSGS)) { check_ban(c->ci, u, TTB_AMSGS); bot_kick(c->ci, u, BOT_REASON_AMSGS); diff --git a/src/language.cpp b/src/language.cpp index e91f45638..43789cff1 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -1768,6 +1768,10 @@ const char *const language_strings[LANG_STRING_COUNT] = { _(" Italics kicker : %s"), /* BOT_INFO_CHAN_KICK_ITALICS_BAN */ _(" Italics kicker : %s (%d kick(s) to ban)"), + /* BOT_INFO_CHAN_KICK_AMSGS */ + _(" AMSG kicker : %s"), + /* BOT_INFO_CHAN_KICK_AMSGS_BAN */ + _(" AMSG kicker : %s (%d kick(s) to ban)"), /* BOT_INFO_CHAN_MSG */ _(" Fantasy reply : %s"), /* BOT_INFO_ACTIVE */ |