aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_dccallow.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-06-29 16:29:56 +0100
committerGravatar Sadie Powell2023-06-29 17:01:25 +0100
commit29705306f21d713c2928d8896f48a3cbb640eacc (patch)
tree5642409ba5a61ab578eb84a11cce5ba81e493187 /src/modules/m_dccallow.cpp
parentMerge branch 'insp3' into master. (diff)
Retain the "real" username properly like we do for hostnames.
This introduces the concept of a real username. This value comes from either the initial USER message or from an ident lookup. Doing this allows us to use it for bans through vidents and cloaking web client users using their remote username. While changing this I also changed all of the uses of "ident" other than RFC 1413 lookups and some compatibility cases to refer to usernames as user(name) instead of ident. Our use of ident in these places was incorrect as that only refers to the RFC 1413 response and is not commonly used in the way we used it by any other IRC server implementations.
Diffstat (limited to 'src/modules/m_dccallow.cpp')
-rw-r--r--src/modules/m_dccallow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 73a050b2a..7607f54a4 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -296,7 +296,7 @@ public:
}
}
- std::string mask = target->nick+"!"+target->ident+"@"+target->GetDisplayedHost();
+ std::string mask = target->GetMask();
unsigned long length;
if (parameters.size() < 2)
{
@@ -506,14 +506,14 @@ public:
return MOD_RES_PASSTHRU;
user->WriteNotice("The user " + u->nick + " is not accepting DCC SENDs from you. Your file " + filename + " was not sent.");
- u->WriteNotice(user->nick + " (" + user->ident + "@" + user->GetDisplayedHost() + ") attempted to send you a file named " + filename + ", which was blocked.");
+ u->WriteNotice(user->nick + " (" + user->GetUserHost() + ") attempted to send you a file named " + filename + ", which was blocked.");
u->WriteNotice("If you trust " + user->nick + " and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system.");
return MOD_RES_DENY;
}
else if (blockchat && irc::equals(type, "CHAT"))
{
user->WriteNotice("The user " + u->nick + " is not accepting DCC CHAT requests from you.");
- u->WriteNotice(user->nick + " (" + user->ident + "@" + user->GetDisplayedHost() + ") attempted to initiate a DCC CHAT session, which was blocked.");
+ u->WriteNotice(user->nick + " (" + user->GetUserHost() + ") attempted to initiate a DCC CHAT session, which was blocked.");
u->WriteNotice("If you trust " + user->nick + " and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system.");
return MOD_RES_DENY;
}