From 76ce8ece1a4803c98bfe9460f40bf8e0fbc409e6 Mon Sep 17 00:00:00 2001 From: Robby Date: Tue, 17 Jan 2017 05:03:25 +0100 Subject: Cleanup some excess whitespaces and tabs, and fix a few typos along the way. --- modules/commands/bs_assign.cpp | 4 ++-- modules/commands/bs_badwords.cpp | 6 +++--- modules/commands/bs_kick.cpp | 16 ++++++++-------- modules/commands/cs_access.cpp | 2 +- modules/commands/cs_akick.cpp | 8 ++++---- modules/commands/cs_enforce.cpp | 6 +++--- modules/commands/cs_entrymsg.cpp | 2 +- modules/commands/cs_flags.cpp | 2 +- modules/commands/cs_list.cpp | 2 +- modules/commands/cs_log.cpp | 2 +- modules/commands/cs_mode.cpp | 14 +++++++------- modules/commands/cs_seen.cpp | 2 +- modules/commands/cs_set.cpp | 2 +- modules/commands/cs_suspend.cpp | 2 +- modules/commands/cs_topic.cpp | 2 +- modules/commands/cs_updown.cpp | 2 +- modules/commands/cs_xop.cpp | 4 ++-- modules/commands/greet.cpp | 4 ++-- modules/commands/help.cpp | 6 +++--- modules/commands/hs_group.cpp | 2 +- modules/commands/hs_request.cpp | 4 ++-- modules/commands/hs_set.cpp | 2 +- modules/commands/ms_rsend.cpp | 2 +- modules/commands/ns_ajoin.cpp | 6 +++--- modules/commands/ns_alist.cpp | 2 +- modules/commands/ns_drop.cpp | 2 +- modules/commands/ns_group.cpp | 4 ++-- modules/commands/ns_list.cpp | 2 +- modules/commands/ns_recover.cpp | 2 +- modules/commands/ns_set.cpp | 4 ++-- modules/commands/ns_set_misc.cpp | 2 +- modules/commands/os_akill.cpp | 2 +- modules/commands/os_config.cpp | 2 +- modules/commands/os_defcon.cpp | 10 +++++----- modules/commands/os_dns.cpp | 14 +++++++------- modules/commands/os_ignore.cpp | 6 +++--- modules/commands/os_info.cpp | 4 ++-- modules/commands/os_logsearch.cpp | 2 +- modules/commands/os_module.cpp | 2 +- modules/commands/os_news.cpp | 6 +++--- modules/commands/os_oper.cpp | 2 +- modules/commands/os_session.cpp | 6 +++--- modules/commands/os_set.cpp | 2 +- 43 files changed, 90 insertions(+), 90 deletions(-) (limited to 'modules/commands') diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index 1d91d4be6..132b609db 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -173,7 +173,7 @@ class CommandBSSetNoBot : public Command if (value.equals_ci("ON")) { - Log(LOG_ADMIN, source, this, ci) << "to enable nobot"; + Log(LOG_ADMIN, source, this, ci) << "to enable nobot"; ci->Extend("BS_NOBOT"); if (ci->bi) @@ -182,7 +182,7 @@ class CommandBSSetNoBot : public Command } else if (value.equals_ci("OFF")) { - Log(LOG_ADMIN, source, this, ci) << "to disable nobot"; + Log(LOG_ADMIN, source, this, ci) << "to disable nobot"; ci->Shrink("BS_NOBOT"); source.Reply(_("No-bot mode is now \002off\002 on channel %s."), ci->name.c_str()); diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index 31f295832..785c31cdd 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -70,7 +70,7 @@ struct BadWordsImpl : BadWords { if (this->badwords->empty() || index >= this->badwords->size()) return; - + FOREACH_MOD(OnBadWordDel, (ci, (*this->badwords)[index])); delete this->badwords->at(index); @@ -127,7 +127,7 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) unsigned int n; data["type"] >> n; - + BadWordImpl *bw; if (obj) bw = anope_dynamic_static_cast(obj); @@ -140,7 +140,7 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) BadWordsImpl *bws = ci->Require("badwords"); if (!obj) bws->badwords->push_back(bw); - + return bw; } diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index 3a52878c1..9e29762db 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -25,7 +25,7 @@ struct KickerDataImpl : KickerData capsmin = capspercent = 0; floodlines = floodsecs = 0; repeattimes = 0; - + dontkickops = dontkickvoices = false; } @@ -33,7 +33,7 @@ struct KickerDataImpl : KickerData { if (amsgs || badwords || bolds || caps || colors || flood || italics || repeat || reverses || underlines) return; - + ci->Shrink("kickerdata"); } @@ -297,7 +297,7 @@ class CommandBSKickBadwords : public CommandBSKickBase Process(source, ci, params[1], params.size() > 2 ? params[2] : "", TTB_BADWORDS, "badwords", kd, kd->badwords); kd->Check(ci); } - + } bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override @@ -818,7 +818,7 @@ class CommandBSSetDontKickOps : public Command if (params[1].equals_ci("ON")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickops"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickops"; kd->dontkickops = true; source.Reply(_("Bot \002won't kick ops\002 on channel %s."), ci->name.c_str()); @@ -826,7 +826,7 @@ class CommandBSSetDontKickOps : public Command else if (params[1].equals_ci("OFF")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickops"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickops"; kd->dontkickops = false; source.Reply(_("Bot \002will kick ops\002 on channel %s."), ci->name.c_str()); @@ -883,7 +883,7 @@ class CommandBSSetDontKickVoices : public Command if (params[1].equals_ci("ON")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickvoices"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickvoices"; kd->dontkickvoices = true; source.Reply(_("Bot \002won't kick voices\002 on channel %s."), ci->name.c_str()); @@ -891,7 +891,7 @@ class CommandBSSetDontKickVoices : public Command else if (params[1].equals_ci("OFF")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickvoices"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickvoices"; kd->dontkickvoices = false; source.Reply(_("Bot \002will kick voices\002 on channel %s."), ci->name.c_str()); @@ -1364,7 +1364,7 @@ class BSKick : public Module else { Anope::string wordbuf = " " + bw->word + " "; - + if ((casesensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!casesensitive && nbuf.find_ci(wordbuf) != Anope::string::npos)) mustkick = true; } diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 9e50428bc..8bc6b9a31 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -437,7 +437,7 @@ class CommandCSAccess : public Command list.Process(replies); source.Reply(_("Access list for %s:"), ci->name.c_str()); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index af2b28449..922ea0b4b 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -58,7 +58,7 @@ class CommandCSAKick : public Command } Entry e("", mask); - + mask = (e.nick.empty() ? "*" : e.nick) + "!" + (e.user.empty() ? "*" : e.user) + "@" + (e.host.empty() ? "*" : e.host); @@ -272,7 +272,7 @@ class CommandCSAKick : public Command { if (!number || number > ci->GetAkickCount()) return; - + const AutoKick *akick = ci->GetAkick(number - 1); Anope::string timebuf, lastused; @@ -347,7 +347,7 @@ class CommandCSAKick : public Command list.Process(replies); source.Reply(_("Autokick list for %s:"), ci->name.c_str()); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); @@ -442,7 +442,7 @@ class CommandCSAKick : public Command } bool is_list = cmd.equals_ci("LIST") || cmd.equals_ci("VIEW"); - + bool has_access = false; if (source.AccessFor(ci).HasPriv("AKICK") || source.HasPriv("chanserv/access/modify")) has_access = true; diff --git a/modules/commands/cs_enforce.cpp b/modules/commands/cs_enforce.cpp index edc709a68..6ebd79990 100644 --- a/modules/commands/cs_enforce.cpp +++ b/modules/commands/cs_enforce.cpp @@ -61,7 +61,7 @@ class CommandCSEnforce : public Command } for (unsigned i = 0; i < users.size(); ++i) - { + { User *user = users[i]; Anope::string mask = ci->GetIdealBan(user); @@ -158,7 +158,7 @@ class CommandCSEnforce : public Command for (unsigned i = 0; i < users.size(); ++i) { User *user = users[i]; - + Anope::string reason = Language::Translate(user, _("BANS enforced by ")) + source.GetNick(); ci->c->Kick(NULL, user, "%s", reason.c_str()); } @@ -213,7 +213,7 @@ class CommandCSEnforce : public Command for (unsigned i = 0; i < users.size(); ++i) { User *user = users[i]; - + Anope::string reason = Language::Translate(user, _("LIMIT enforced by ")) + source.GetNick(); ci->c->Kick(NULL, user, "%s", reason.c_str()); } diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index aed56b38a..05afc8a7a 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -133,7 +133,7 @@ class CommandEntryMessage : public Command source.Reply(_("End of entry message list.")); } - + void DoAdd(CommandSource &source, ChannelInfo *ci, const Anope::string &message) { EntryMessageList *messages = ci->Require("entrymsg"); diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index f253c4d1a..14a7df744 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -45,7 +45,7 @@ class FlagsChanAccess : public ChanAccess { if (access->provider->name == "access/flags") return access->AccessSerialize(); - + std::set buffer; for (std::map::iterator it = defaultFlags.begin(), it_end = defaultFlags.end(); it != it_end; ++it) diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp index f1216de0c..db47d6e9e 100644 --- a/modules/commands/cs_list.cpp +++ b/modules/commands/cs_list.cpp @@ -230,7 +230,7 @@ class CommandCSSetPrivate : public Command this->SendSyntax(source); source.Reply(" "); source.Reply(_("Enables or disables the \002private\002 option for a channel.")); - + BotInfo *bi; Anope::string cmd; if (Command::FindCommandFromService("chanserv/list", bi, cmd)) diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index 91da629d5..9a0548d1b 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -53,7 +53,7 @@ struct LogSettingImpl : LogSetting, Serializable ChannelInfo *ci = ChannelInfo::Find(sci); if (ci == NULL) return NULL; - + LogSettingImpl *ls; if (obj) ls = anope_dynamic_static_cast(obj); diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index 4f177a771..e2aac8d61 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -222,13 +222,13 @@ void ModeLockImpl::Serialize(Serialize::Data &data) const Serializable* ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci; - + data["ci"] >> sci; ChannelInfo *ci = ChannelInfo::Find(sci); if (!ci) return NULL; - + ModeLockImpl *ml; if (obj) ml = anope_dynamic_static_cast(obj); @@ -475,7 +475,7 @@ class CommandCSMode : public Command else this->OnSyntaxError(source, subcommand); } - + void DoSet(CommandSource &source, ChannelInfo *ci, const std::vector ¶ms) { User *u = source.GetUser(); @@ -832,7 +832,7 @@ class CommandCSModes : public Command source.Reply(ACCESS_DENIED); return; } - + if (u == targ ? !u_access.HasPriv(m.second + "ME") : !u_access.HasPriv(m.second)) { if (!can_override) @@ -929,7 +929,7 @@ class CSMode : public Module for (int i = 0; i < conf->CountBlock("command"); ++i) { Configuration::Block *block = conf->GetBlock("command", i); - + const Anope::string &cname = block->Get("name"), &cmd = block->Get("command"); @@ -938,7 +938,7 @@ class CSMode : public Module const Anope::string &set = block->Get("set"), &unset = block->Get("unset"); - + if (set.empty() && unset.empty()) continue; @@ -983,7 +983,7 @@ class CSMode : public Module if (c->HasMode(cm->name)) c->RemoveMode(NULL, cm, "", false); } - + } else if (cm->type == MODE_LIST || cm->type == MODE_STATUS) { diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 1eedabce9..54c0676c8 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -57,7 +57,7 @@ struct SeenInfo : Serializable static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string snick; - + data["nick"] >> snick; SeenInfo *s; diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index 266fa361f..c8b7941a6 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -1312,7 +1312,7 @@ class CSSet : public Module { if (chan->ci) { - if (noautoop.HasExt(chan->ci)) + if (noautoop.HasExt(chan->ci)) give_modes = false; if (secureops.HasExt(chan->ci) && !user->HasPriv("chanserv/administration")) // This overrides what chanserv does because it is loaded after chanserv diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index 87df57610..538f9aba3 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -54,7 +54,7 @@ class CommandCSSuspend : public Command { public: CommandCSSuspend(Module *creator) : Command(creator, "chanserv/suspend", 2, 3) - { + { this->SetDesc(_("Prevent a channel from being used preserving channel data and settings")); this->SetSyntax(_("\037channel\037 [+\037expiry\037] [\037reason\037]")); } diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp index b0568c017..3bb82c9c8 100644 --- a/modules/commands/cs_topic.cpp +++ b/modules/commands/cs_topic.cpp @@ -121,7 +121,7 @@ class CommandCSTopic : public Command ci->c->ChangeTopic(source.GetNick(), topic, Anope::CurTime); if (has_topiclock) topiclock->Set(ci); - + bool override = !source.AccessFor(ci).HasPriv("TOPIC"); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << (!topic.empty() ? "to change the topic to: " : "to unset the topic") << (!topic.empty() ? topic : ""); } diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp index 41892059d..61bbacd7d 100644 --- a/modules/commands/cs_updown.cpp +++ b/modules/commands/cs_updown.cpp @@ -166,7 +166,7 @@ class CommandCSDown : public Command const Anope::string &nick = params.size() > 1 ? params[1] : source.GetNick(); Channel *c = Channel::Find(channel); - + if (c == NULL) { source.Reply(CHAN_X_NOT_IN_USE, channel.c_str()); diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 3df3fa527..e71a3bbf3 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -349,7 +349,7 @@ class CommandCSXOP : public Command return; } } - + source.Reply(_("\002%s\002 not found on %s %s list."), mask.c_str(), ci->name.c_str(), source.command.c_str()); } } @@ -466,7 +466,7 @@ class CommandCSXOP : public Command if (access->provider->name != "access/xop" || source.command.upper() != access->AccessSerialize()) continue; - + delete ci->EraseAccess(i - 1); } diff --git a/modules/commands/greet.cpp b/modules/commands/greet.cpp index c6270119f..4d454d08b 100644 --- a/modules/commands/greet.cpp +++ b/modules/commands/greet.cpp @@ -46,7 +46,7 @@ class CommandBSSetGreet : public Command if (value.equals_ci("ON")) { bool override = !source.AccessFor(ci).HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable greets"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable greets"; ci->Extend("BS_GREET"); source.Reply(_("Greet mode is now \002on\002 on channel %s."), ci->name.c_str()); @@ -54,7 +54,7 @@ class CommandBSSetGreet : public Command else if (value.equals_ci("OFF")) { bool override = !source.AccessFor(ci).HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable greets"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable greets"; ci->Shrink("BS_GREET"); source.Reply(_("Greet mode is now \002off\002 on channel %s."), ci->name.c_str()); diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp index 9f28c54da..bd8647e2e 100644 --- a/modules/commands/help.cpp +++ b/modules/commands/help.cpp @@ -40,7 +40,7 @@ class CommandHelp : public Command FOREACH_RESULT(OnPreHelp, MOD_RESULT, (source, params)); if (MOD_RESULT == EVENT_STOP) return; - + Anope::string source_command = source.command; const BotInfo *bi = source.service; const CommandInfo::map &map = source.c ? Config->Fantasy : bi->commands; @@ -149,7 +149,7 @@ class CommandHelp : public Command if (hide_privileged_commands && !info.permission.empty() && !source.HasCommand(info.permission)) continue; - + // Allow unregistered users to see help for commands that they explicitly request help for const Anope::string &subcommand = params.size() > max ? params[max] : ""; @@ -183,7 +183,7 @@ class CommandHelp : public Command if (helped == false) source.Reply(_("No help available for \002%s\002."), params[0].c_str()); } - + FOREACH_MOD(OnPostHelp, (source, params)); return; diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp index 0c9cbfdd4..46ebd39c6 100644 --- a/modules/commands/hs_group.cpp +++ b/modules/commands/hs_group.cpp @@ -24,7 +24,7 @@ class CommandHSGroup : public Command if (!na || !na->HasVhost()) return; - setting = true; + setting = true; for (unsigned i = 0; i < na->nc->aliases->size(); ++i) { NickAlias *nick = na->nc->aliases->at(i); diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp index c44b8daf2..a03a7f655 100644 --- a/modules/commands/hs_request.cpp +++ b/modules/commands/hs_request.cpp @@ -102,7 +102,7 @@ class CommandHSRequest : public Command } Anope::string rawhostmask = params[0]; - + Anope::string user, host; size_t a = rawhostmask.find('@'); @@ -380,7 +380,7 @@ static void req_send_memos(Module *me, CommandSource &source, const Anope::strin for (unsigned i = 0; i < Oper::opers.size(); ++i) { Oper *o = Oper::opers[i]; - + const NickAlias *na = NickAlias::Find(o->name); if (!na) continue; diff --git a/modules/commands/hs_set.cpp b/modules/commands/hs_set.cpp index e9349287d..0b6afda4b 100644 --- a/modules/commands/hs_set.cpp +++ b/modules/commands/hs_set.cpp @@ -110,7 +110,7 @@ class CommandHSSetAll : public Command { if (!na || !na->HasVhost()) return; - + for (unsigned i = 0; i < na->nc->aliases->size(); ++i) { NickAlias *nick = na->nc->aliases->at(i); diff --git a/modules/commands/ms_rsend.cpp b/modules/commands/ms_rsend.cpp index 61e1d5695..9b16eae0d 100644 --- a/modules/commands/ms_rsend.cpp +++ b/modules/commands/ms_rsend.cpp @@ -58,7 +58,7 @@ class CommandMSRSend : public Command source.Reply(_("Please wait %d seconds before using the %s command again."), Config->GetModule("memoserv")->Get("senddelay"), source.command.c_str()); else if (result == MemoServService::MEMO_TARGET_FULL) source.Reply(_("Sorry, %s currently has too many memos and cannot receive more."), nick.c_str()); - else + else { source.Reply(_("Memo sent to \002%s\002."), nick.c_str()); diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index baa77a46e..08687f325 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -197,7 +197,7 @@ class CommandNSAJoin : public Command for (; i < (*channels)->size(); ++i) if ((*channels)->at(i)->channel.equals_ci(chan)) break; - + if (i == (*channels)->size()) notfoundchans += chan + ", "; else @@ -341,7 +341,7 @@ class NSAJoin : public Module bool need_invite = false; Anope::string key = entry->key; AccessGroup u_access; - + if (ci != NULL) { if (ci->HasExt("CS_SUSPENDED")) @@ -362,7 +362,7 @@ class NSAJoin : public Module need_invite = true; else if (c->HasMode("INVITE") && c->MatchesList(u, "INVITEOVERRIDE") == false) need_invite = true; - + if (c->HasMode("KEY")) { Anope::string k; diff --git a/modules/commands/ns_alist.cpp b/modules/commands/ns_alist.cpp index 95dadcb96..cfbff2026 100644 --- a/modules/commands/ns_alist.cpp +++ b/modules/commands/ns_alist.cpp @@ -81,7 +81,7 @@ class CommandNSAList : public Command AccessGroup access = ci->AccessFor(nc, false); if (access.empty()) continue; - + ++chan_count; entry["Number"] = stringify(chan_count); diff --git a/modules/commands/ns_drop.cpp b/modules/commands/ns_drop.cpp index 71ebc0e2e..8f0f506a8 100644 --- a/modules/commands/ns_drop.cpp +++ b/modules/commands/ns_drop.cpp @@ -65,7 +65,7 @@ class CommandNSDrop : public Command if (!source.HasPriv("nickserv/drop")) source.Reply(_("You may drop any nick within your group.")); else - source.Reply(_("As a Services Operator, you may drop any nick.")); + source.Reply(_("As a Services Operator, you may drop any nick.")); return true; } diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp index 57a239daa..acd85996c 100644 --- a/modules/commands/ns_group.cpp +++ b/modules/commands/ns_group.cpp @@ -18,7 +18,7 @@ class NSGroupRequest : public IdentifyRequest Command *cmd; Anope::string nick; Reference target; - + public: NSGroupRequest(Module *o, CommandSource &src, Command *c, const Anope::string &n, NickAlias *targ, const Anope::string &pass) : IdentifyRequest(o, targ->nc->display, pass), source(src), cmd(c), nick(n), target(targ) { } @@ -335,7 +335,7 @@ class CommandNSGList : public Command source.Reply(!nick.empty() ? _("List of nicknames in the group of \002%s\002:") : _("List of nicknames in your group:"), nc->display.c_str()); std::vector replies; list.Process(replies); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp index b6babb87f..158da68e8 100644 --- a/modules/commands/ns_list.cpp +++ b/modules/commands/ns_list.cpp @@ -119,7 +119,7 @@ class CommandNSList : public Command ++count; } } - + source.Reply(_("List of entries matching \002%s\002:"), pattern.c_str()); std::vector replies; diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp index 9da3be43f..a78c8dccd 100644 --- a/modules/commands/ns_recover.cpp +++ b/modules/commands/ns_recover.cpp @@ -28,7 +28,7 @@ class NSRecoverRequest : public IdentifyRequest CommandSource source; Command *cmd; Anope::string user; - + public: NSRecoverRequest(Module *o, CommandSource &src, Command *c, const Anope::string &nick, const Anope::string &pass) : IdentifyRequest(o, nick, pass), source(src), cmd(c), user(nick) { } diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index 28b5e99cc..dc007289e 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -416,7 +416,7 @@ class CommandNSSetEmail : public Command static bool SendConfirmMail(User *u, NickCore *nc, BotInfo *bi, const Anope::string &new_email) { Anope::string code = Anope::Random(9); - + std::pair *n = nc->Extend >("ns_set_email"); n->first = new_email; n->second = code; @@ -1176,7 +1176,7 @@ class NSSet : public Module SerializableExtensibleItem autoop, killprotect, kill_quick, kill_immed, message, secure, noexpire; - + struct KeepModes : SerializableExtensibleItem { KeepModes(Module *m, const Anope::string &n) : SerializableExtensibleItem(m, n) { } diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp index 8325e6c57..7ee7cf0f5 100644 --- a/modules/commands/ns_set_misc.cpp +++ b/modules/commands/ns_set_misc.cpp @@ -201,7 +201,7 @@ class NSSetMisc : public Module for (int i = 0; i < conf->CountBlock("command"); ++i) { Configuration::Block *block = conf->GetBlock("command", i); - + const Anope::string &cmd = block->Get("command"); if (cmd != "nickserv/set/misc" && cmd != "nickserv/saset/misc") diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index b959fd9a0..0b3e34a90 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -321,7 +321,7 @@ class CommandOSAKill : public Command else { source.Reply(_("Current AKILL list:")); - + std::vector replies; list.Process(replies); diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp index 3402a2f99..2fb6be63a 100644 --- a/modules/commands/os_config.cpp +++ b/modules/commands/os_config.cpp @@ -53,7 +53,7 @@ class CommandOSConfig : public Command const Anope::string show_blocks[] = { "serverinfo", "networkinfo", "options", "" }; Log(LOG_ADMIN, source, this) << "VIEW"; - + for (unsigned i = 0; !show_blocks[i].empty(); ++i) { Configuration::Block *block = Config->GetBlock(show_blocks[i]); diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 5ad413784..f1dd94e9f 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -79,19 +79,19 @@ struct DefconConfig { DefConModesOnParams.erase(name); } - + bool GetDefConParam(const Anope::string &name, Anope::string &buf) { std::map::iterator it = DefConModesOnParams.find(name); - + buf.clear(); - + if (it != DefConModesOnParams.end()) { buf = it->second; return true; } - + return false; } }; @@ -324,7 +324,7 @@ class OSDefcon : public Module if ((cm = ModeManager::FindChannelModeByName("REDIRECT")) && DConfig.DefConModesOn.count(cm->name) && !DConfig.DefConModesOn.count("LIMIT")) { DConfig.DefConModesOn.erase("REDIRECT"); - + Log(this) << "DefConChanModes must lock mode +l as well to lock mode +L"; } } diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp index 829e79f40..7dad85d56 100644 --- a/modules/commands/os_dns.cpp +++ b/modules/commands/os_dns.cpp @@ -424,7 +424,7 @@ class CommandOSDNS : public Command { DNSServer *s = DNSServer::Find(params[1]); const Anope::string &zone = params.size() > 2 ? params[2] : ""; - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -487,7 +487,7 @@ class CommandOSDNS : public Command void AddIP(CommandSource &source, const std::vector ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -522,11 +522,11 @@ class CommandOSDNS : public Command dnsmanager->Notify(*it); } } - + void DelIP(CommandSource &source, const std::vector ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -565,7 +565,7 @@ class CommandOSDNS : public Command void OnSet(CommandSource &source, const std::vector ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -598,7 +598,7 @@ class CommandOSDNS : public Command void OnPool(CommandSource &source, const std::vector ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -633,7 +633,7 @@ class CommandOSDNS : public Command void OnDepool(CommandSource &source, const std::vector ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); diff --git a/modules/commands/os_ignore.cpp b/modules/commands/os_ignore.cpp index 667ced438..18d496f90 100644 --- a/modules/commands/os_ignore.cpp +++ b/modules/commands/os_ignore.cpp @@ -38,7 +38,7 @@ Serializable* IgnoreDataImpl::Unserialize(Serializable *obj, Serialize::Data &da { if (!ignore_service) return NULL; - + IgnoreDataImpl *ign; if (obj) ign = anope_dynamic_static_cast(obj); @@ -94,7 +94,7 @@ class OSIgnoreService : public IgnoreService { User *u = User::Find(mask, true); std::vector::iterator ign = this->ignores->begin(), ign_end = this->ignores->end(); - + if (u) { for (; ign != ign_end; ++ign) @@ -163,7 +163,7 @@ class CommandOSIgnore : public Command User *u = User::Find(mask, true); if (u) return "*!*@" + u->host; - + size_t host = mask.find('@'); /* Determine whether we get a nick or a mask. */ if (host != Anope::string::npos) diff --git a/modules/commands/os_info.cpp b/modules/commands/os_info.cpp index 3897c34d9..674160f31 100644 --- a/modules/commands/os_info.cpp +++ b/modules/commands/os_info.cpp @@ -18,7 +18,7 @@ struct OperInfo : Serializable OperInfo() : Serializable("OperInfo"), created(0) { } OperInfo(const Anope::string &t, const Anope::string &i, const Anope::string &a, time_t c) : Serializable("OperInfo"), target(t), info(i), adder(a), created(c) { } - + ~OperInfo(); void Serialize(Serialize::Data &data) const anope_override @@ -74,7 +74,7 @@ Serializable *OperInfo::Unserialize(Serializable *obj, Serialize::Data &data) Extensible *e = OperInfos::Find(starget); if (!e) return NULL; - + OperInfos *oi = e->Require("operinfo"); OperInfo *o; if (obj) diff --git a/modules/commands/os_logsearch.cpp b/modules/commands/os_logsearch.cpp index d009036b0..59959b482 100644 --- a/modules/commands/os_logsearch.cpp +++ b/modules/commands/os_logsearch.cpp @@ -20,7 +20,7 @@ class CommandOSLogSearch : public Command char timestamp[32]; tm *tm = localtime(&t); - + strftime(timestamp, sizeof(timestamp), "%Y%m%d", tm); return Anope::LogDir + "/" + file + "." + timestamp; diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp index 4036c7edc..52401b545 100644 --- a/modules/commands/os_module.cpp +++ b/modules/commands/os_module.cpp @@ -139,7 +139,7 @@ class CommandOSModUnLoad : public Command source.Reply(_("Module \002%s\002 isn't loaded."), mname.c_str()); return; } - + if (!m->handle || m->GetPermanent() || m->type == PROTOCOL) { source.Reply(_("Unable to remove module \002%s\002."), m->name.c_str()); diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp index 22f31c8cc..5a47fe5ee 100644 --- a/modules/commands/os_news.cpp +++ b/modules/commands/os_news.cpp @@ -115,7 +115,7 @@ class MyNewsService : public NewsService { this->newsItems[n->type].push_back(n); } - + void DelNewsItem(NewsItem *n) { std::vector &list = this->GetNewsList(n->type); @@ -259,7 +259,7 @@ class NewsBase : public Command const char **msgs = findmsgs(ntype); if (!msgs) - throw CoreException("news: Invalid type to do_news()"); + throw CoreException("news: Invalid type to DoNews()"); if (cmd.equals_ci("LIST")) return this->DoList(source, ntype, msgs); @@ -404,7 +404,7 @@ class OSNews : public Module msg = _("[\002Random News\002 - %s] %s"); int start = 0; - + if (Type != NEWS_RANDOM) { start = newsList.size() - news_count; diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index e2871cab9..589441454 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -186,7 +186,7 @@ class CommandOSOper : public Command if (params.size() > 2) fulltype += " " + params[2]; OperType *ot = OperType::Find(fulltype); - if (ot == NULL) + if (ot == NULL) source.Reply(_("Oper type \002%s\002 has not been configured."), fulltype.c_str()); else { diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index 6bb717133..037310b4a 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -66,7 +66,7 @@ class MySessionService : public SessionService Exception *e = *it; if (Anope::Match(u->host, e->mask) || Anope::Match(u->ip.addr(), e->mask)) return e; - + if (cidr(e->mask).match(u->ip)) return e; } @@ -209,7 +209,7 @@ class CommandOSSession : public Command std::vector replies; list.Process(replies); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); } @@ -491,7 +491,7 @@ class CommandOSException : public Command else { source.Reply(_("Current Session Limit Exception list:")); - + std::vector replies; list.Process(replies); diff --git a/modules/commands/os_set.cpp b/modules/commands/os_set.cpp index 846e24dc5..9ce9dafe4 100644 --- a/modules/commands/os_set.cpp +++ b/modules/commands/os_set.cpp @@ -129,7 +129,7 @@ class CommandOSSet : public Command return; } catch (const ConvertException &) { } - + source.Reply(_("Setting for DEBUG must be \002ON\002, \002OFF\002, or a positive number.")); } -- cgit