diff options
Diffstat (limited to 'modules/botserv')
| -rw-r--r-- | modules/botserv/assign.cpp | 2 | ||||
| -rw-r--r-- | modules/botserv/bot.cpp | 3 | ||||
| -rw-r--r-- | modules/botserv/info.cpp | 5 | ||||
| -rw-r--r-- | modules/botserv/kick.cpp | 28 | ||||
| -rw-r--r-- | modules/botserv/set.cpp | 2 |
5 files changed, 37 insertions, 3 deletions
diff --git a/modules/botserv/assign.cpp b/modules/botserv/assign.cpp index a26b869fe..95691b6a9 100644 --- a/modules/botserv/assign.cpp +++ b/modules/botserv/assign.cpp @@ -207,7 +207,9 @@ class CommandBSSetNoBot : public Command source.Reply(_("No-bot mode is now \002off\002 for \002{0}\002."), ci->GetName()); } else + { this->OnSyntaxError(source, source.command); + } } bool OnHelp(CommandSource &source, const Anope::string &) override diff --git a/modules/botserv/bot.cpp b/modules/botserv/bot.cpp index 2e33b7ccb..30550df56 100644 --- a/modules/botserv/bot.cpp +++ b/modules/botserv/bot.cpp @@ -216,6 +216,7 @@ class CommandBSBot : public Command return; } +#warning "xline on the stack" /* The new nick is really different, so we remove the Q line for the old nick. */ //XLine x_del(bi->nick); //IRCD->SendSQLineDel(&x_del); @@ -373,7 +374,9 @@ class CommandBSBot : public Command this->DoDel(source, params); } else + { this->OnSyntaxError(source, ""); + } } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override diff --git a/modules/botserv/info.cpp b/modules/botserv/info.cpp index 4de86643f..bc4db8b0f 100644 --- a/modules/botserv/info.cpp +++ b/modules/botserv/info.cpp @@ -76,9 +76,6 @@ class CommandBSInfo : public Command source.Reply(_("Information for channel \002{0}\002:"), ci->GetName()); info[_("Bot nick")] = ci->GetBot() ? ci->GetBot()->nick : _("not assigned yet"); - Anope::string enabled = Language::Translate(source.nc, _("Enabled")); - Anope::string disabled = Language::Translate(source.nc, _("Disabled")); - EventManager::Get()->Dispatch(&Event::ServiceBotEvent::OnServiceBot, source, bi, ci, info); std::vector<Anope::string> replies; @@ -88,7 +85,9 @@ class CommandBSInfo : public Command source.Reply(replies[i]); } else + { source.Reply(_("\002{0}\002 is not a valid bot or registered channel."), query); + } } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override diff --git a/modules/botserv/kick.cpp b/modules/botserv/kick.cpp index 1b9d67fc7..4411ee4ed 100644 --- a/modules/botserv/kick.cpp +++ b/modules/botserv/kick.cpp @@ -898,7 +898,9 @@ class CommandBSKickFlood : public CommandBSKickBase source.Reply(_("Bot won't kick for \002flood\002 anymore.")); } else + { this->OnSyntaxError(source, params[1]); + } } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override @@ -998,7 +1000,9 @@ class CommandBSKickRepeat : public CommandBSKickBase source.Reply(_("Bot won't kick for \002repeats\002 anymore.")); } else + { this->OnSyntaxError(source, params[1]); + } } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override @@ -1110,7 +1114,9 @@ class CommandBSSetDontKickOps : public Command source.Reply(_("Bot \002will kick ops\002 on channel \002{0}\002."), ci->GetName()); } else + { this->OnSyntaxError(source, source.command); + } } bool OnHelp(CommandSource &source, const Anope::string &) override @@ -1174,7 +1180,9 @@ class CommandBSSetDontKickVoices : public Command source.Reply(_("Bot \002will kick voices\002 on channel %s."), ci->GetName().c_str()); } else + { this->OnSyntaxError(source, source.command); + } } bool OnHelp(CommandSource &source, const Anope::string &) override @@ -1402,7 +1410,9 @@ class BSKick : public Module info[_("Bad words kicker")] = enabled; } else + { info[_("Bad words kicker")] = disabled; + } if (kd && kd->GetBolds()) { @@ -1412,7 +1422,9 @@ class BSKick : public Module info[_("Bolds kicker")] = enabled; } else + { info[_("Bolds kicker")] = disabled; + } if (kd && kd->GetCaps()) { @@ -1422,7 +1434,9 @@ class BSKick : public Module info[_("Caps kicker")] = Anope::printf(_("%s (minimum %d/%d%%)"), enabled.c_str(), kd->GetCapsMin(), kd->GetCapsPercent()); } else + { info[_("Caps kicker")] = disabled; + } if (kd && kd->GetColors()) { @@ -1432,7 +1446,9 @@ class BSKick : public Module info[_("Colors kicker")] = enabled; } else + { info[_("Colors kicker")] = disabled; + } if (kd && kd->GetFlood()) { @@ -1442,7 +1458,9 @@ class BSKick : public Module info[_("Flood kicker")] = Anope::printf(_("%s (%d lines in %ds)"), enabled.c_str(), kd->GetFloodLines(), kd->GetFloodSecs()); } else + { info[_("Flood kicker")] = disabled; + } if (kd && kd->GetRepeat()) { @@ -1452,7 +1470,9 @@ class BSKick : public Module info[_("Repeat kicker")] = Anope::printf(_("%s (%d times)"), enabled.c_str(), kd->GetRepeatTimes()); } else + { info[_("Repeat kicker")] = disabled; + } if (kd && kd->GetReverses()) { @@ -1462,7 +1482,9 @@ class BSKick : public Module info[_("Reverses kicker")] = enabled; } else + { info[_("Reverses kicker")] = disabled; + } if (kd && kd->GetUnderlines()) { @@ -1472,7 +1494,9 @@ class BSKick : public Module info[_("Underlines kicker")] = enabled; } else + { info[_("Underlines kicker")] = disabled; + } if (kd && kd->GetItalics()) { @@ -1482,7 +1506,9 @@ class BSKick : public Module info[_("Italics kicker")] = enabled; } else + { info[_("Italics kicker")] = disabled; + } if (kd && kd->GetAmsgs()) { @@ -1492,7 +1518,9 @@ class BSKick : public Module info[_("AMSG kicker")] = enabled; } else + { info[_("AMSG kicker")] = disabled; + } if (kd && kd->GetDontKickOps()) info.AddOption(_("Ops protection")); diff --git a/modules/botserv/set.cpp b/modules/botserv/set.cpp index bb432e3f0..6ab429d97 100644 --- a/modules/botserv/set.cpp +++ b/modules/botserv/set.cpp @@ -191,7 +191,9 @@ class CommandBSSetPrivate : public Command source.Reply(_("Private mode of bot \002{0}\002 is now \002off\002."), bi->nick); } else + { this->OnSyntaxError(source, source.command); + } } bool OnHelp(CommandSource &source, const Anope::string &) override |
