summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-01-28 16:45:14 +0000
committerPeter Powell <petpow@saberuk.com>2019-01-28 17:26:15 +0000
commit4818b1bc1b0dd8560b0c83901aa33ecaf6fb1275 (patch)
treeed7ce7aaa4c3d3e71cef3fc9bf5c9e3640d576bd /src/coremods
parente84858dc7f1efdfb76efc1e115e6999fd222af74 (diff)
Fix not checking for server names case insensitively.
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_info/cmd_admin.cpp2
-rw-r--r--src/coremods/core_info/cmd_info.cpp2
-rw-r--r--src/coremods/core_info/cmd_modules.cpp2
-rw-r--r--src/coremods/core_info/cmd_motd.cpp2
-rw-r--r--src/coremods/core_info/cmd_time.cpp2
-rw-r--r--src/coremods/core_stats.cpp2
6 files changed, 6 insertions, 6 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);