aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-08-20 15:58:54 +0100
committerGravatar Sadie Powell2021-08-20 16:31:47 +0100
commitb1cb8ef3a4a892b4f3d470d0e2380d4cc07d2a44 (patch)
tree21d721b0b4a49ed4dcac19cbc098d51406359ab9 /src/modules
parentRefer to oper names in core_oper as "username" not "login". (diff)
Avoid duplicating User::MakeHostIP.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_customtitle.cpp4
-rw-r--r--src/modules/m_spanningtree/opertype.cpp3
-rw-r--r--src/modules/m_tline.cpp3
3 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index a1af43f5e..3dd168df3 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -48,9 +48,7 @@ struct CustomTitle
bool MatchUser(User* user) const
{
- const std::string userHost = user->ident + "@" + user->GetRealHost();
- const std::string userIP = user->ident + "@" + user->GetIPString();
- return InspIRCd::MatchMask(host, userHost, userIP);
+ return InspIRCd::MatchMask(host, user->MakeHost(), user->MakeHostIP());
}
bool CheckPass(User* user, const std::string& pass) const
diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp
index 24e818397..066913e0c 100644
--- a/src/modules/m_spanningtree/opertype.cpp
+++ b/src/modules/m_spanningtree/opertype.cpp
@@ -57,7 +57,8 @@ CmdResult CommandOpertype::HandleRemote(RemoteUser* u, CommandBase::Params& para
return CmdResult::SUCCESS;
}
- ServerInstance->SNO.WriteToSnoMask('O', "From %s: User %s (%s@%s) is now a server operator of type %s", u->server->GetName().c_str(), u->nick.c_str(),u->ident.c_str(), u->GetRealHost().c_str(), opertype.c_str());
+ ServerInstance->SNO.WriteToSnoMask('O', "From %s: User %s (%s) is now a server operator of type %s",
+ u->server->GetName().c_str(), u->nick.c_str(), u->MakeHost().c_str(), opertype.c_str());
return CmdResult::SUCCESS;
}
diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp
index f058cace3..f9e98b08e 100644
--- a/src/modules/m_tline.cpp
+++ b/src/modules/m_tline.cpp
@@ -49,8 +49,7 @@ class CommandTline : public Command
}
else
{
- std::string host = u->ident + "@" + u->GetIPString();
- if (InspIRCd::MatchCIDR(host, parameters[0]))
+ if (InspIRCd::MatchCIDR(u->MakeHostIP(), parameters[0]))
{
n_matched++;
n_match_ip++;