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/CMakeLists.txt | 1 - 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 +- modules/database/db_flatfile.cpp | 6 ++-- modules/database/db_old.cpp | 7 ++--- modules/database/db_redis.cpp | 10 +++---- modules/database/db_sql.cpp | 1 - modules/database/db_sql_live.cpp | 3 +- modules/encryption/enc_md5.cpp | 2 +- modules/extra/m_ldap.cpp | 5 ++-- modules/extra/m_ldap_authentication.cpp | 2 +- modules/extra/m_mysql.cpp | 5 ++-- modules/extra/m_regex_pcre.cpp | 2 +- modules/extra/m_sqlite.cpp | 3 +- modules/extra/m_ssl_openssl.cpp | 8 +++--- modules/extra/stats/cs_fantasy_stats.cpp | 1 - modules/extra/stats/cs_fantasy_top.cpp | 3 +- modules/extra/stats/irc2sql/CMakeLists.txt | 1 - modules/extra/stats/irc2sql/irc2sql.h | 2 -- modules/extra/stats/irc2sql/utils.cpp | 1 - modules/extra/stats/m_chanstats.cpp | 3 +- modules/fantasy.cpp | 9 +++--- modules/m_dns.cpp | 43 ++++++++++++++-------------- modules/m_dnsbl.cpp | 1 - modules/m_httpd.cpp | 2 +- modules/m_proxyscan.cpp | 3 +- modules/m_rewrite.cpp | 4 +-- modules/m_xmlrpc.cpp | 1 - modules/m_xmlrpc_main.cpp | 3 +- modules/protocol/bahamut.cpp | 4 +-- modules/protocol/charybdis.cpp | 8 +++--- modules/protocol/hybrid.cpp | 2 +- modules/protocol/inspircd12.cpp | 4 +-- modules/protocol/ngircd.cpp | 10 +++---- modules/protocol/plexus.cpp | 2 +- modules/protocol/ratbox.cpp | 14 ++++----- modules/protocol/unreal.cpp | 12 ++++---- modules/protocol/unreal4.cpp | 12 ++++---- modules/pseudoclients/botserv.cpp | 3 +- modules/pseudoclients/chanserv.cpp | 3 +- modules/pseudoclients/global.cpp | 3 +- modules/pseudoclients/hostserv.cpp | 1 - modules/pseudoclients/memoserv.cpp | 1 - modules/pseudoclients/nickserv.cpp | 3 +- modules/pseudoclients/operserv.cpp | 3 +- modules/webcpanel/CMakeLists.txt | 1 - modules/webcpanel/pages/chanserv/access.cpp | 1 - modules/webcpanel/pages/chanserv/access.h | 1 - modules/webcpanel/pages/chanserv/akick.cpp | 1 - modules/webcpanel/pages/chanserv/akick.h | 1 - modules/webcpanel/pages/chanserv/info.cpp | 1 - modules/webcpanel/pages/chanserv/info.h | 1 - modules/webcpanel/pages/chanserv/modes.cpp | 1 - modules/webcpanel/pages/chanserv/modes.h | 1 - modules/webcpanel/pages/chanserv/set.cpp | 1 - modules/webcpanel/pages/chanserv/set.h | 1 - modules/webcpanel/pages/chanserv/utils.cpp | 1 - modules/webcpanel/pages/chanserv/utils.h | 1 - modules/webcpanel/pages/confirm.cpp | 1 - modules/webcpanel/pages/confirm.h | 1 - modules/webcpanel/pages/hostserv/request.cpp | 4 +-- modules/webcpanel/pages/index.cpp | 3 +- modules/webcpanel/pages/index.h | 1 - modules/webcpanel/pages/logout.cpp | 1 - modules/webcpanel/pages/logout.h | 1 - modules/webcpanel/pages/memoserv/memos.cpp | 1 - modules/webcpanel/pages/memoserv/memos.h | 1 - modules/webcpanel/pages/nickserv/access.cpp | 1 - modules/webcpanel/pages/nickserv/access.h | 1 - modules/webcpanel/pages/nickserv/alist.cpp | 3 +- modules/webcpanel/pages/nickserv/alist.h | 1 - modules/webcpanel/pages/nickserv/cert.cpp | 1 - modules/webcpanel/pages/nickserv/cert.h | 1 - modules/webcpanel/pages/nickserv/info.cpp | 3 +- modules/webcpanel/pages/nickserv/info.h | 1 - modules/webcpanel/pages/operserv/akill.cpp | 1 - modules/webcpanel/pages/operserv/akill.h | 1 - modules/webcpanel/pages/register.cpp | 1 - modules/webcpanel/pages/register.h | 1 - modules/webcpanel/static_fileserver.cpp | 3 +- modules/webcpanel/static_fileserver.h | 1 - modules/webcpanel/template_fileserver.cpp | 9 +++--- modules/webcpanel/template_fileserver.h | 1 - modules/webcpanel/webcpanel.cpp | 2 +- 125 files changed, 195 insertions(+), 261 deletions(-) (limited to 'modules') diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 02139a0e5..7894b8c11 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -167,4 +167,3 @@ endmacro(build_subdir) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) build_modules(${CMAKE_CURRENT_SOURCE_DIR}) - 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.")); } diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 3b9b8c3c4..fff1e7b59 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -94,7 +94,7 @@ class LoadData : public Serialize::Data hash ^= Anope::hash_cs()(it->second); return hash; } - + void Reset() { id = 0; @@ -247,7 +247,7 @@ class DBFlatFile : public Module, public Pipe Serialize::Type *stype = Serialize::Type::Find(type_order[i]); if (!stype || stype->GetOwner()) continue; - + std::vector &pos = positions[stype->GetName()]; for (unsigned j = 0; j < pos.size(); ++j) @@ -411,5 +411,3 @@ class DBFlatFile : public Module, public Pipe }; MODULE_INIT(DBFlatFile) - - diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index dc1060abc..55b6bedc7 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -689,7 +689,7 @@ static void LoadVHosts() NickAlias *na = NickAlias::Find(nick); if (na == NULL) { - Log() << "Removing vhost for non-existent nick " << nick; + Log() << "Removing vhost for nonexistent nick " << nick; continue; } @@ -858,7 +858,7 @@ static void LoadChannels() if (in_use) { ChanAccess *access = NULL; - + if (xop) { if (provider_xop) @@ -1214,7 +1214,7 @@ static void LoadExceptions() dbFILE *f = open_db_read("OperServ", "exception.db", 9); if (f == NULL) return; - + int16_t num; READ(read_int16(&num, f)); for (int i = 0; i < num; ++i) @@ -1358,4 +1358,3 @@ class DBOld : public Module }; MODULE_INIT(DBOld) - diff --git a/modules/database/db_redis.cpp b/modules/database/db_redis.cpp index b51fa5d0e..5dfb6accf 100644 --- a/modules/database/db_redis.cpp +++ b/modules/database/db_redis.cpp @@ -201,7 +201,7 @@ class DatabaseRedis : public Module, public Pipe std::vector args; args.push_back("SMEMBERS"); args.push_back("ids:" + sb->GetName()); - + redis->SendCommand(new TypeLoader(this, sb->GetName()), args); } @@ -456,14 +456,14 @@ void SubscriptionListener::OnResult(const Reply &r) */ if (r.multi_bulk.size() != 4) return; - + size_t sz = r.multi_bulk[2]->bulk.find(':'); if (sz == Anope::string::npos) return; - + const Anope::string &key = r.multi_bulk[2]->bulk.substr(sz + 1), &op = r.multi_bulk[3]->bulk; - + sz = key.rfind(':'); if (sz == Anope::string::npos) return; @@ -479,7 +479,7 @@ void SubscriptionListener::OnResult(const Reply &r) if (s_type == NULL) return; - + uint64_t obj_id; try { diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index 32c261b23..377c4cd30 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -266,4 +266,3 @@ class DBSQL : public Module, public Pipe }; MODULE_INIT(DBSQL) - diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index f82db6d52..538ff0a64 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -157,7 +157,7 @@ class DBMySQL : public Module, public Pipe void OnSerializableDestruct(Serializable *obj) anope_override { - if (!this->CheckInit()) + if (!this->CheckInit()) return; Serialize::Type *s_type = obj->GetSerializableType(); if (s_type) @@ -262,4 +262,3 @@ class DBMySQL : public Module, public Pipe }; MODULE_INIT(DBMySQL) - diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/enc_md5.cpp index 88252dbee..b9667d597 100644 --- a/modules/encryption/enc_md5.cpp +++ b/modules/encryption/enc_md5.cpp @@ -284,7 +284,7 @@ class MD5Context : public Encryption::Context /* MD5 finalization. Ends an MD5 message-digest opera * the message digest and zeroizing the context. - */ + */ void Finalize() anope_override { unsigned char bits[8]; diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index a98b786fc..a8a4ba38c 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -269,7 +269,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition ldap_unbind_ext(this->con, NULL, NULL); } - + void BindAsAdmin(LDAPInterface *i) anope_override { this->Bind(i, this->admin_binddn, this->admin_pass); @@ -575,7 +575,7 @@ class ModuleLDAP : public Module, public Pipe delete req; } - } + } } }; @@ -619,4 +619,3 @@ int LDAPModify::run() } MODULE_INIT(ModuleLDAP) - diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index 30f36501e..4aaafb4a2 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -29,7 +29,7 @@ struct IdentifyInfo { req->Hold(me); } - + ~IdentifyInfo() { req->Release(me); diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 11b6f4c60..72cf889c4 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -456,7 +456,7 @@ Query MySQLService::BuildInsert(const Anope::string &table, unsigned int id, Dat query.SetValue(it->first, buf, escape); } - + return query; } @@ -476,7 +476,7 @@ void MySQLService::Connect() if (!connect) throw SQL::Exception("Unable to connect to MySQL service " + this->name + ": " + mysql_error(this->sql)); - + Log(LOG_DEBUG) << "Successfully connected to MySQL service " << this->name << " at " << this->server << ":" << this->port; } @@ -553,4 +553,3 @@ void DispatcherThread::Run() } MODULE_INIT(ModuleSQL) - diff --git a/modules/extra/m_regex_pcre.cpp b/modules/extra/m_regex_pcre.cpp index c2e9a1f10..bbb90a8b8 100644 --- a/modules/extra/m_regex_pcre.cpp +++ b/modules/extra/m_regex_pcre.cpp @@ -23,7 +23,7 @@ class PCRERegex : public Regex int erroffset; this->regex = pcre_compile(expr.c_str(), PCRE_CASELESS, &error, &erroffset, NULL); if (!this->regex) - throw RegexException("Error in regex " + expr + " at offset " + stringify(erroffset) + ": " + error); + throw RegexException("Error in regex " + expr + " at offset " + stringify(erroffset) + ": " + error); } ~PCRERegex() diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index 35e25aac9..b444c1a6c 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -299,7 +299,7 @@ Query SQLiteService::BuildInsert(const Anope::string &table, unsigned int id, Da *it->second >> buf; query.SetValue(it->first, buf); } - + return query; } @@ -332,4 +332,3 @@ Anope::string SQLiteService::FromUnixtime(time_t t) } MODULE_INIT(ModuleSQLite) - diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 65b06604e..391ab2f9f 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -205,7 +205,7 @@ void MySSLService::Init(Socket *s) { if (s->io != &NormalSocketIO) throw CoreException("Socket initializing SSL twice"); - + s->io = new SSLSocketIO(); } @@ -283,7 +283,7 @@ ClientSocket *SSLSocketIO::Accept(ListenSocket *s) newsocket->flags[SF_ACCEPTING] = true; this->FinishAccept(newsocket); - + return newsocket; } @@ -297,7 +297,7 @@ SocketFlag SSLSocketIO::FinishAccept(ClientSocket *cs) throw SocketException("SSLSocketIO::FinishAccept called for a socket not accepted nor accepting?"); SSLSocketIO *io = anope_dynamic_static_cast(cs->io); - + int ret = SSL_accept(io->sslsock); if (ret <= 0) { @@ -378,7 +378,7 @@ SocketFlag SSLSocketIO::FinishConnect(ConnectionSocket *s) if (!SSL_set_fd(io->sslsock, s->GetFD())) throw SocketException("Unable to set SSL fd"); } - + int ret = SSL_connect(io->sslsock); if (ret <= 0) { diff --git a/modules/extra/stats/cs_fantasy_stats.cpp b/modules/extra/stats/cs_fantasy_stats.cpp index 628d40747..d571c0c2b 100644 --- a/modules/extra/stats/cs_fantasy_stats.cpp +++ b/modules/extra/stats/cs_fantasy_stats.cpp @@ -174,4 +174,3 @@ void CommandCSGStats::Execute(CommandSource &source, const std::vectorDoTop(source, params, true, 10); } - MODULE_INIT(CSTop) diff --git a/modules/extra/stats/irc2sql/CMakeLists.txt b/modules/extra/stats/irc2sql/CMakeLists.txt index 9d36c6e8d..781f0ef1f 100644 --- a/modules/extra/stats/irc2sql/CMakeLists.txt +++ b/modules/extra/stats/irc2sql/CMakeLists.txt @@ -1,2 +1 @@ build_subdir(${CMAKE_CURRENT_SOURCE_DIR}) - diff --git a/modules/extra/stats/irc2sql/irc2sql.h b/modules/extra/stats/irc2sql/irc2sql.h index d18e89762..19b230200 100644 --- a/modules/extra/stats/irc2sql/irc2sql.h +++ b/modules/extra/stats/irc2sql/irc2sql.h @@ -82,5 +82,3 @@ class IRC2SQL : public Module void OnBotNotice(User *u, BotInfo *bi, Anope::string &message) anope_override; }; - - diff --git a/modules/extra/stats/irc2sql/utils.cpp b/modules/extra/stats/irc2sql/utils.cpp index 0b0fe787f..3a349ccfb 100644 --- a/modules/extra/stats/irc2sql/utils.cpp +++ b/modules/extra/stats/irc2sql/utils.cpp @@ -66,4 +66,3 @@ bool IRC2SQL::HasEvent(const Anope::string &table) return true; return false; } - diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 08d654da4..40c8db5d1 100644 --- a/modules/extra/stats/m_chanstats.cpp +++ b/modules/extra/stats/m_chanstats.cpp @@ -111,7 +111,7 @@ class CommandNSSetChanstats : public Command { this->Run(source, source.nc->display, params[0]); } - + bool OnHelp(CommandSource &source, const Anope::string &) anope_override { this->SendSyntax(source); @@ -653,4 +653,3 @@ class MChanstats : public Module }; MODULE_INIT(MChanstats) - diff --git a/modules/fantasy.cpp b/modules/fantasy.cpp index 7f17247fc..9da340b50 100644 --- a/modules/fantasy.cpp +++ b/modules/fantasy.cpp @@ -46,7 +46,7 @@ class CommandBSSetFantasy : 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 fantasy"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable fantasy"; ci->Extend("BS_FANTASY"); source.Reply(_("Fantasy mode is now \002on\002 on channel %s."), ci->name.c_str()); @@ -54,7 +54,7 @@ class CommandBSSetFantasy : 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 fantasy"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable fantasy"; ci->Shrink("BS_FANTASY"); source.Reply(_("Fantasy mode is now \002off\002 on channel %s."), ci->name.c_str()); @@ -125,7 +125,7 @@ class Fantasy : public Module { return; } - + if (params.empty()) return; @@ -149,7 +149,7 @@ class Fantasy : public Module ServiceReference cmd("Command", info.name); if (!cmd) { - Log(LOG_DEBUG) << "Fantasy command " << it->first << " exists for non-existent service " << info.name << "!"; + Log(LOG_DEBUG) << "Fantasy command " << it->first << " exists for nonexistent service " << info.name << "!"; return; } @@ -216,4 +216,3 @@ class Fantasy : public Module }; MODULE_INIT(Fantasy) - diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp index 945421a06..34b7d5d2f 100644 --- a/modules/m_dns.cpp +++ b/modules/m_dns.cpp @@ -109,7 +109,7 @@ class Packet : public Query return name; } - + Question UnpackQuestion(const unsigned char *input, unsigned short input_size, unsigned short &pos) { Question question; @@ -212,7 +212,7 @@ class Packet : public Query unsigned short id; /* Flags on the packet */ unsigned short flags; - + Packet(Manager *m, sockaddrs *a) : manager(m), id(0), flags(0) { if (a) @@ -248,7 +248,7 @@ class Packet : public Query for (unsigned i = 0; i < qdcount; ++i) this->questions.push_back(this->UnpackQuestion(input, len, packet_pos)); - + for (unsigned i = 0; i < ancount; ++i) this->answers.push_back(this->UnpackResourceRecord(input, len, packet_pos)); @@ -270,7 +270,7 @@ class Packet : public Query { if (output_size < HEADER_LENGTH) throw SocketException("Unable to pack packet"); - + unsigned short pos = 0; output[pos++] = this->id >> 8; @@ -433,7 +433,7 @@ class Packet : public Query l = htonl(manager->GetSerial()); memcpy(&output[pos], &l, 4); pos += 4; - + l = htonl(refresh); // Refresh memcpy(&output[pos], &l, 4); pos += 4; @@ -459,7 +459,7 @@ class Packet : public Query break; } } - + return pos; } }; @@ -478,7 +478,7 @@ namespace DNS class TCPSocket : public ListenSocket { Manager *manager; - + public: /* A TCP client */ class Client : public ClientSocket, public Timer, public ReplySocket @@ -487,7 +487,7 @@ class TCPSocket : public ListenSocket Packet *packet; unsigned char packet_buffer[524]; int length; - + public: Client(Manager *m, TCPSocket *l, int fd, const sockaddrs &addr) : Socket(fd, l->IsIPv6()), ClientSocket(l, addr), Timer(5), manager(m), packet(NULL), length(0) @@ -500,7 +500,7 @@ class TCPSocket : public ListenSocket Log(LOG_DEBUG_2) << "Resolver: Exiting client from " << clientaddr.addr(); delete packet; } - + /* Times out after a few seconds */ void Tick(time_t) anope_override { } @@ -560,13 +560,13 @@ class TCPSocket : public ListenSocket }; TCPSocket(Manager *m, const Anope::string &ip, int port) : Socket(-1, ip.find(':') != Anope::string::npos), ListenSocket(ip, port, ip.find(':') != Anope::string::npos), manager(m) { } - + ClientSocket *OnAccept(int fd, const sockaddrs &addr) anope_override { return new Client(this->manager, this, fd, addr); } }; - + /* Listens for UDP requests */ class UDPSocket : public ReplySocket { @@ -581,15 +581,15 @@ class UDPSocket : public ReplySocket for (unsigned i = 0; i < packets.size(); ++i) delete packets[i]; } - + void Reply(Packet *p) anope_override { packets.push_back(p); SocketEngine::Change(this, true, SF_WRITABLE); } - + std::deque& GetPackets() { return packets; } - + bool ProcessRead() anope_override { Log(LOG_DEBUG_2) << "Resolver: Reading from DNS UDP socket"; @@ -600,7 +600,7 @@ class UDPSocket : public ReplySocket int length = recvfrom(this->GetFD(), reinterpret_cast(&packet_buffer), sizeof(packet_buffer), 0, &from_server.sa, &x); return this->manager->HandlePacket(this, packet_buffer, length, &from_server); } - + bool ProcessWrite() anope_override { Log(LOG_DEBUG_2) << "Resolver: Writing to DNS UDP socket"; @@ -623,7 +623,7 @@ class UDPSocket : public ReplySocket if (packets.empty()) SocketEngine::Change(this, false, SF_WRITABLE); - + return true; } }; @@ -689,7 +689,7 @@ class MyManager : public Manager, public Timer delete tcpsock; for (std::map::iterator it = this->requests.begin(), it_end = this->requests.end(); it != it_end;) - { + { Request *request = it->second; ++it; @@ -767,7 +767,7 @@ class MyManager : public Manager, public Timer this->requests[req->id] = req; req->SetSecs(timeout); - + Packet *p = new Packet(this, &this->addrs); p->flags = QUERYFLAGS_RD; p->id = req->id; @@ -931,7 +931,7 @@ class MyManager : public Manager, public Timer request->OnLookupComplete(&recv_packet); this->AddCache(recv_packet); } - + delete request; return true; } @@ -992,7 +992,7 @@ class MyManager : public Manager, public Timer this->cache.erase(it); } } - + private: /** Add a record to the dns cache * @param r The record @@ -1020,7 +1020,7 @@ class MyManager : public Manager, public Timer return false; } - + }; class ModuleDNS : public Module @@ -1139,4 +1139,3 @@ class ModuleDNS : public Module }; MODULE_INIT(ModuleDNS) - diff --git a/modules/m_dnsbl.cpp b/modules/m_dnsbl.cpp index 4b885fa71..6f315430d 100644 --- a/modules/m_dnsbl.cpp +++ b/modules/m_dnsbl.cpp @@ -192,4 +192,3 @@ class ModuleDNSBL : public Module }; MODULE_INIT(ModuleDNSBL) - diff --git a/modules/m_httpd.cpp b/modules/m_httpd.cpp index 7d8055a36..193da975a 100644 --- a/modules/m_httpd.cpp +++ b/modules/m_httpd.cpp @@ -149,7 +149,7 @@ class MyHTTPClient : public HTTPClient this->Serve(); } - + return true; } diff --git a/modules/m_proxyscan.cpp b/modules/m_proxyscan.cpp index 57d06142c..5e9611b1e 100644 --- a/modules/m_proxyscan.cpp +++ b/modules/m_proxyscan.cpp @@ -117,7 +117,7 @@ class HTTPProxyConnect : public ProxyConnect, public BufferedSocket void OnConnect() anope_override { this->Write("CONNECT %s:%d HTTP/1.0", target_ip.c_str(), target_port); - this->Write("Content-length: 0"); + this->Write("Content-Length: 0"); this->Write("Connection: close"); this->Write(""); } @@ -376,4 +376,3 @@ class ModuleProxyScan : public Module }; MODULE_INIT(ModuleProxyScan) - diff --git a/modules/m_rewrite.cpp b/modules/m_rewrite.cpp index b90f20342..a9788c7e1 100644 --- a/modules/m_rewrite.cpp +++ b/modules/m_rewrite.cpp @@ -20,7 +20,7 @@ struct Rewrite for (unsigned i = 0; i < sm.size(); ++i) if (i >= message.size() || (sm[i] != "$" && !sm[i].equals_ci(message[i]))) return false; - + return true; } @@ -71,7 +71,7 @@ struct Rewrite } static std::vector rewrites; - + static Rewrite *Find(const Anope::string &client, const Anope::string &cmd) { for (unsigned i = 0; i < rewrites.size(); ++i) diff --git a/modules/m_xmlrpc.cpp b/modules/m_xmlrpc.cpp index 13b8a0fa5..66b280a38 100644 --- a/modules/m_xmlrpc.cpp +++ b/modules/m_xmlrpc.cpp @@ -225,4 +225,3 @@ class ModuleXMLRPC : public Module }; MODULE_INIT(ModuleXMLRPC) - diff --git a/modules/m_xmlrpc_main.cpp b/modules/m_xmlrpc_main.cpp index 337801407..3969cab59 100644 --- a/modules/m_xmlrpc_main.cpp +++ b/modules/m_xmlrpc_main.cpp @@ -131,7 +131,7 @@ class MyXMLRPCEvent : public XMLRPCEvent req->Dispatch(); return false; } - + return true; } @@ -303,4 +303,3 @@ class ModuleXMLRPCMain : public Module }; MODULE_INIT(ModuleXMLRPCMain) - diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 9cd13182f..88f07aab1 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -373,7 +373,7 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[6]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[6] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistent server " << params[6] << "?"; return; } @@ -449,7 +449,7 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for nonexistent user " << buf << " on " << params[1]; continue; } diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 3c1db98ba..6890d8948 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -32,7 +32,7 @@ class ChannelModeLargeBan : public ChannelMode class CharybdisProto : public IRCDProto { public: - + CharybdisProto(Module *creator) : IRCDProto(creator, "Charybdis 3.4+") { DefaultPseudoclientModes = "+oiS"; @@ -69,12 +69,12 @@ class CharybdisProto : public IRCDProto void SendSASLMechanisms(std::vector &mechanisms) anope_override { Anope::string mechlist; - + for (unsigned i = 0; i < mechanisms.size(); ++i) { mechlist += "," + mechanisms[i]; } - + UplinkSocket::Message(Me) << "ENCAP * MECHLIST :" << (mechanisms.empty() ? "" : mechlist.substr(1)); } @@ -321,7 +321,7 @@ class ProtoCharybdis : public Module ModeManager::AddUserMode(new UserMode("NOFORWARD", 'Q')); ModeManager::AddUserMode(new UserMode("REGPRIV", 'R')); ModeManager::AddUserMode(new UserModeOperOnly("OPERWALLS", 'z')); - ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z')); + ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z')); /* b/e/I */ ModeManager::AddChannelMode(new ChannelModeList("QUIET", 'q')); diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index db988bce1..b97c38973 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -460,7 +460,7 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for nonexistent user " << buf << " on " << params[1]; continue; } diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index bd4975741..348969285 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -950,7 +950,7 @@ struct IRCDMessageFJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "FJOIN for non-existent user " << buf << " on " << params[0]; + Log(LOG_DEBUG) << "FJOIN for nonexistent user " << buf << " on " << params[0]; continue; } @@ -1226,7 +1226,7 @@ struct IRCDMessageServer : IRCDMessage struct IRCDMessageSQuit : Message::SQuit { IRCDMessageSQuit(Module *creator) : Message::SQuit(creator) { } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override { if (params[0] == rsquit_id || params[0] == rsquit_server) diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index 869a82bd6..d72f24641 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -317,7 +317,7 @@ struct IRCDMessageMetadata : IRCDMessage User *u = User::Find(params[0]); if (!u) { - Log(LOG_DEBUG) << "received METADATA for non-existent user " << params[0]; + Log(LOG_DEBUG) << "received METADATA for nonexistent user " << params[0]; return; } if (params[1].equals_cs("accountname")) @@ -426,7 +426,7 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[4]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[4] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistent server " << params[4] << "?"; return; } User::OnIntroduce(params[0], params[2], params[3], "", "", s, params[6], Anope::CurTime, params[5], "", NULL); @@ -475,11 +475,11 @@ struct IRCDMessageNJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "NJOIN for non-existent user " << buf << " on " << params[0]; + Log(LOG_DEBUG) << "NJOIN for nonexistent user " << buf << " on " << params[0]; continue; } users.push_back(sju); - } + } Message::Join::SJoin(source, params[0], 0, "", users); } @@ -562,7 +562,7 @@ struct IRCDMessageTopic : IRCDMessage Channel *c = Channel::Find(params[0]); if (!c) { - Log(LOG_DEBUG) << "TOPIC for non-existent channel " << params[0]; + Log(LOG_DEBUG) << "TOPIC for nonexistent channel " << params[0]; return; } c->ChangeTopicInternal(source.GetUser(), source.GetName(), params[1], Anope::CurTime); diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index ffbb2c755..525ef4320 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -343,7 +343,7 @@ class ProtoPlexus : public Module Message::Topic message_topic; Message::Version message_version; Message::Whois message_whois; - + /* Hybrid message handlers */ ServiceAlias message_bmask, message_eob, message_join, message_nick, message_sid, message_sjoin, message_tburst, message_tmode; diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 5f4934702..70a704486 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -20,14 +20,14 @@ class RatboxProto : public IRCDProto BotInfo *FindIntroduced() { BotInfo *bi = Config->GetClient("OperServ"); - + if (bi && bi->introduced) return bi; - + for (botinfo_map::iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it) if (it->second->introduced) return it->second; - + return NULL; } @@ -65,18 +65,18 @@ class RatboxProto : public IRCDProto { /* Calculate the time left before this would expire, cap