diff options
author | Peter Powell <petpow@saberuk.com> | 2019-01-28 16:45:14 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-01-28 17:26:15 +0000 |
commit | 4818b1bc1b0dd8560b0c83901aa33ecaf6fb1275 (patch) | |
tree | ed7ce7aaa4c3d3e71cef3fc9bf5c9e3640d576bd /src | |
parent | e84858dc7f1efdfb76efc1e115e6999fd222af74 (diff) |
Fix not checking for server names case insensitively.
Diffstat (limited to 'src')
-rw-r--r-- | src/coremods/core_info/cmd_admin.cpp | 2 | ||||
-rw-r--r-- | src/coremods/core_info/cmd_info.cpp | 2 | ||||
-rw-r--r-- | src/coremods/core_info/cmd_modules.cpp | 2 | ||||
-rw-r--r-- | src/coremods/core_info/cmd_motd.cpp | 2 | ||||
-rw-r--r-- | src/coremods/core_info/cmd_time.cpp | 2 | ||||
-rw-r--r-- | src/coremods/core_stats.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_check.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_opermotd.cpp | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/src/coremods/core_info/cmd_admin.cpp b/src/coremods/core_info/cmd_admin.cpp index 44827555d..58a799d77 100644 --- a/src/coremods/core_info/cmd_admin.cpp +++ b/src/coremods/core_info/cmd_admin.cpp @@ -32,7 +32,7 @@ CommandAdmin::CommandAdmin(Module* parent) */ CmdResult CommandAdmin::Handle(User* user, const Params& parameters) { - if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName) + if (parameters.size() > 0 && !irc::equals(parameters[0], ServerInstance->Config->ServerName)) return CMD_SUCCESS; user->WriteRemoteNumeric(RPL_ADMINME, InspIRCd::Format("Administrative info for %s", ServerInstance->Config->ServerName.c_str())); if (!AdminName.empty()) diff --git a/src/coremods/core_info/cmd_info.cpp b/src/coremods/core_info/cmd_info.cpp index ee0794934..431175f7a 100644 --- a/src/coremods/core_info/cmd_info.cpp +++ b/src/coremods/core_info/cmd_info.cpp @@ -78,7 +78,7 @@ static const char* const lines[] = { */ CmdResult CommandInfo::Handle(User* user, const Params& parameters) { - if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName) + if (parameters.size() > 0 && !irc::equals(parameters[0], ServerInstance->Config->ServerName)) return CMD_SUCCESS; int i=0; diff --git a/src/coremods/core_info/cmd_modules.cpp b/src/coremods/core_info/cmd_modules.cpp index 7212e9525..d68c8b9fd 100644 --- a/src/coremods/core_info/cmd_modules.cpp +++ b/src/coremods/core_info/cmd_modules.cpp @@ -42,7 +42,7 @@ CmdResult CommandModules::Handle(User* user, const Params& parameters) { // Don't ask remote servers about their modules unless the local user asking is an oper // 2.0 asks anyway, so let's handle that the same way - bool for_us = (parameters.empty() || parameters[0] == ServerInstance->Config->ServerName); + bool for_us = (parameters.empty() || irc::equals(parameters[0], ServerInstance->Config->ServerName)); if ((!for_us) || (!IS_LOCAL(user))) { if (!user->IsOper()) diff --git a/src/coremods/core_info/cmd_motd.cpp b/src/coremods/core_info/cmd_motd.cpp index e4c575539..eb6460f00 100644 --- a/src/coremods/core_info/cmd_motd.cpp +++ b/src/coremods/core_info/cmd_motd.cpp @@ -31,7 +31,7 @@ CommandMotd::CommandMotd(Module* parent) */ CmdResult CommandMotd::Handle(User* user, const Params& parameters) { - if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName) + if (parameters.size() > 0 && !irc::equals(parameters[0], ServerInstance->Config->ServerName)) { // Give extra penalty if a non-oper queries the /MOTD of a remote server LocalUser* localuser = IS_LOCAL(user); diff --git a/src/coremods/core_info/cmd_time.cpp b/src/coremods/core_info/cmd_time.cpp index 73987cf01..725ef6cb5 100644 --- a/src/coremods/core_info/cmd_time.cpp +++ b/src/coremods/core_info/cmd_time.cpp @@ -29,7 +29,7 @@ CommandTime::CommandTime(Module* parent) CmdResult CommandTime::Handle(User* user, const Params& parameters) { - if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName) + if (parameters.size() > 0 && !irc::equals(parameters[0], ServerInstance->Config->ServerName)) return CMD_SUCCESS; user->WriteRemoteNumeric(RPL_TIME, ServerInstance->Config->ServerName, InspIRCd::TimeString(ServerInstance->Time())); diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index 6a4427aef..6576aa514 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -378,7 +378,7 @@ void CommandStats::DoStats(Stats::Context& stats) CmdResult CommandStats::Handle(User* user, const Params& parameters) { - if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName) + if (parameters.size() > 1 && !irc::equals(parameters[1], ServerInstance->Config->ServerName)) { // Give extra penalty if a non-oper does /STATS <remoteserver> LocalUser* localuser = IS_LOCAL(user); diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 1d030acc6..2d06df199 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -142,7 +142,7 @@ class CommandCheck : public Command CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { - if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName) + if (parameters.size() > 1 && !irc::equals(parameters[1], ServerInstance->Config->ServerName)) return CMD_SUCCESS; User *targuser; diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index 49409a1c0..591dc97a8 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -36,7 +36,7 @@ class CommandOpermotd : public Command CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { - if ((parameters.empty()) || (parameters[0] == ServerInstance->Config->ServerName)) + if ((parameters.empty()) || (irc::equals(parameters[0], ServerInstance->Config->ServerName))) ShowOperMOTD(user); return CMD_SUCCESS; } |