diff options
Diffstat (limited to 'modules/botserv/bs_kick.cpp')
-rw-r--r-- | modules/botserv/bs_kick.cpp | 281 |
1 files changed, 174 insertions, 107 deletions
diff --git a/modules/botserv/bs_kick.cpp b/modules/botserv/bs_kick.cpp index 835d90491..80d8fc45d 100644 --- a/modules/botserv/bs_kick.cpp +++ b/modules/botserv/bs_kick.cpp @@ -153,13 +153,14 @@ public: } } - source.Reply(_("Type \002%s \037option\037\002 for more information\n" - "on a specific option.\n" - " \n" - "Note: access to this command is controlled by the\n" - "level SET."), + source.Reply(_( + "Type \002%s\032\037option\037\002 for more information " + "on a specific option." + "\n\n" + "Note: access to this command is controlled by the " + "level SET." + ), source.service->GetQueryCommand("generic/help", this_name).c_str()); - return true; } }; @@ -221,8 +222,10 @@ protected: val = true; if (kd->ttb[ttb_idx]) - source.Reply(_("Bot will now kick for \002%s\002, and will place a ban\n" - "after %d kicks for the same user."), optname.c_str(), kd->ttb[ttb_idx]); + { + source.Reply(_("Bot will now kick for \002%s\002, and will place a ban after %d kicks for the same user."), + optname.c_str(), kd->ttb[ttb_idx]); + } else source.Reply(_("Bot will now kick for \002%s\002."), optname.c_str()); @@ -268,13 +271,16 @@ public: this->SendSyntax(source); source.Reply(" "); BotInfo *bi = Config->GetClient("BotServ"); - source.Reply(_("Sets the AMSG kicker on or off. When enabled, the bot will\n" - "kick users who send the same message to multiple channels\n" - "where %s bots are.\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before they get banned. Don't give ttb to disable\n" - "the ban system once activated."), bi ? bi->nick.c_str() : "BotServ"); + source.Reply(_( + "Sets the AMSG kicker on or off. When enabled, the bot will " + "kick users who send the same message to multiple channels " + "where %s bots are." + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before they get banned. Don't give ttb to disable " + "the ban system once activated." + ), + bi ? bi->nick.c_str() : "BotServ"); return true; } }; @@ -305,16 +311,19 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the bad words kicker on or off. When enabled, this\n" - "option tells the bot to kick users who say certain words\n" - "on the channels.\n" - "You can define bad words for your channel using the\n" - "\002BADWORDS\002 command. Type \002%s BADWORDS\002 for\n" - "more information.\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated."), + source.Reply(_( + "Sets the bad words kicker on or off. When enabled, this " + "option tells the bot to kick users who say certain words " + "on the channels." + "\n\n" + "You can define bad words for your channel using the " + "\002BADWORDS\002 command. Type \002%s\032BADWORDS\002 for " + "more information." + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + ), source.service->GetQueryCommand("generic/help").c_str()); return true; } @@ -345,12 +354,14 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the bolds kicker on or off. When enabled, this\n" - "option tells the bot to kick users who use bolds.\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the bolds kicker on or off. When enabled, this " + "option tells the bot to kick users who use bolds." + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + )); return true; } }; @@ -402,12 +413,23 @@ public: kd->caps = true; if (kd->ttb[TTB_CAPS]) - source.Reply(_("Bot will now kick for \002caps\002 (they must constitute at least\n" - "%d characters and %d%% of the entire message), and will\n" - "place a ban after %d kicks for the same user."), kd->capsmin, kd->capspercent, kd->ttb[TTB_CAPS]); + { + source.Reply(_( + "Bot will now kick for \002caps\002 (they must constitute at least " + "%d characters and %d%% of the entire message), and will " + "place a ban after %d kicks for the same user." + ), + kd->capsmin, + kd->capspercent, + kd->ttb[TTB_CAPS]); + } else - source.Reply(_("Bot will now kick for \002caps\002 (they must constitute at least\n" - "%d characters and %d%% of the entire message)."), kd->capsmin, kd->capspercent); + source.Reply(_( + "Bot will now kick for \002caps\002 (they must constitute at least " + "%d characters and %d%% of the entire message)." + ), + kd->capsmin, + kd->capspercent); } else { @@ -422,17 +444,20 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the caps kicker on or off. When enabled, this\n" - "option tells the bot to kick users who are talking in\n" - "CAPS.\n" - "The bot kicks only if there are at least \002min\002 caps\n" - "and they constitute at least \002percent\002%% of the total\n" - "text line (if not given, it defaults to 10 characters\n" - "and 25%%).\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the caps kicker on or off. When enabled, this " + "option tells the bot to kick users who are talking in " + "CAPS." + "\n\n" + "The bot kicks only if there are at least \002min\002 caps " + "and they constitute at least \002percent\002%% of the total " + "text line (if not given, it defaults to 10 characters " + "and 25%%)." + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + )); return true; } }; @@ -462,12 +487,14 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the colors kicker on or off. When enabled, this\n" - "option tells the bot to kick users who use colors.\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the colors kicker on or off. When enabled, this " + "option tells the bot to kick users who use colors." + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + )); return true; } }; @@ -522,8 +549,15 @@ public: kd->flood = true; if (kd->ttb[TTB_FLOOD]) - source.Reply(_("Bot will now kick for \002flood\002 (%d lines in %d seconds\n" - "and will place a ban after %d kicks for the same user."), kd->floodlines, kd->floodsecs, kd->ttb[TTB_FLOOD]); + { + source.Reply(_( + "Bot will now kick for \002flood\002 (%d lines in %d seconds " + "and will place a ban after %d kicks for the same user." + ), + kd->floodlines, + kd->floodsecs, + kd->ttb[TTB_FLOOD]); + } else source.Reply(_("Bot will now kick for \002flood\002 (%d lines in %d seconds)."), kd->floodlines, kd->floodsecs); } @@ -542,14 +576,15 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the flood kicker on or off. When enabled, this\n" - "option tells the bot to kick users who are flooding\n" - "the channel using at least \002ln\002 lines in \002secs\002 seconds\n" - "(if not given, it defaults to 6 lines in 10 seconds).\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the flood kicker on or off. When enabled, this " + "option tells the bot to kick users who are flooding " + "the channel using at least \002ln\002 lines in \002secs\002 seconds " + "(if not given, it defaults to 6 lines in 10 seconds). " + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated.")); return true; } }; @@ -579,12 +614,14 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the italics kicker on or off. When enabled, this\n" - "option tells the bot to kick users who use italics.\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the italics kicker on or off. When enabled, this " + "option tells the bot to kick users who use italics. " + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + )); return true; } }; @@ -633,22 +670,42 @@ public: if (kd->ttb[TTB_REPEAT]) { if (kd->repeattimes != 1) - source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n" - "same message %d times), and will place a ban after %d\n" - "kicks for the same user."), kd->repeattimes, kd->ttb[TTB_REPEAT]); + { + source.Reply(_( + "Bot will now kick for \002repeats\002 (users that repeat the " + "same message %d times), and will place a ban after %d " + "kicks for the same user." + ), + kd->repeattimes, + kd->ttb[TTB_REPEAT]); + } else - source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n" - "same message %d time), and will place a ban after %d\n" - "kicks for the same user."), kd->repeattimes, kd->ttb[TTB_REPEAT]); + source.Reply(_( + "Bot will now kick for \002repeats\002 (users that repeat the " + "same message %d time), and will place a ban after %d " + "kicks for the same user." + ), + kd->repeattimes, + kd->ttb[TTB_REPEAT]); } else { if (kd->repeattimes != 1) - source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n" - "same message %d times)."), kd->repeattimes); + { + source.Reply(_( + "Bot will now kick for \002repeats\002 (users that repeat the " + "same message %d times)." + ), + kd->repeattimes); + } else - source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n" - "same message %d time)."), kd->repeattimes); + { + source.Reply(_( + "Bot will now kick for \002repeats\002 (users that repeat the " + "same message %d time)." + ), + kd->repeattimes); + } } } else if (params[1].equals_ci("OFF")) @@ -666,14 +723,16 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the repeat kicker on or off. When enabled, this\n" - "option tells the bot to kick users who are repeating\n" - "themselves \002num\002 times (if num is not given, it\n" - "defaults to 3).\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the repeat kicker on or off. When enabled, this " + "option tells the bot to kick users who are repeating " + "themselves \002num\002 times (if num is not given, it " + "defaults to 3)." + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + )); return true; } }; @@ -703,12 +762,14 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the reverses kicker on or off. When enabled, this\n" - "option tells the bot to kick users who use reverses.\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the reverses kicker on or off. When enabled, this " + "option tells the bot to kick users who use reverses. " + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + )); return true; } }; @@ -738,12 +799,14 @@ public: { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Sets the underlines kicker on or off. When enabled, this\n" - "option tells the bot to kick users who use underlines.\n" - " \n" - "\037ttb\037 is the number of times a user can be kicked\n" - "before it gets banned. Don't give ttb to disable\n" - "the ban system once activated.")); + source.Reply(_( + "Sets the underlines kicker on or off. When enabled, this " + "option tells the bot to kick users who use underlines. " + "\n\n" + "\037ttb\037 is the number of times a user can be kicked " + "before it gets banned. Don't give ttb to disable " + "the ban system once activated." + )); return true; } }; @@ -806,10 +869,12 @@ public: bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); - source.Reply(_(" \n" - "Enables or disables \002ops protection\002 mode on a channel.\n" - "When it is enabled, ops won't be kicked by the bot\n" - "even if they don't match the NOKICK level.")); + source.Reply(" "); + source.Reply(_( + "Enables or disables \002ops protection\002 mode on a channel. " + "When it is enabled, ops won't be kicked by the bot " + "even if they don't match the NOKICK level." + )); return true; } }; @@ -872,10 +937,12 @@ public: bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); - source.Reply(_(" \n" - "Enables or disables \002voices protection\002 mode on a channel.\n" - "When it is enabled, voices won't be kicked by the bot\n" - "even if they don't match the NOKICK level.")); + source.Reply(" "); + source.Reply(_( + "Enables or disables \002voices protection\002 mode on a channel. " + "When it is enabled, voices won't be kicked by the bot " + "even if they don't match the NOKICK level." + )); return true; } }; |