summaryrefslogtreecommitdiff
path: root/src/modules/m_dccallow.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-22 21:53:24 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-28 16:16:10 +0100
commitd865b434865907bfad0a187dd403d4ca8144e469 (patch)
tree4c36b1028ab02ca8ac2d07b867819f96f38c2745 /src/modules/m_dccallow.cpp
parent08f6f056667df63d1673bea959c73b75393113c6 (diff)
Hide User#host and User#dhost and use accessors to modify them.
This removes the need to invalidate the cache after changing a user's hostname.
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 edf9d012f..e687e1341 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -181,7 +181,7 @@ class CommandDccallow : public Command
}
}
- std::string mask = target->nick+"!"+target->ident+"@"+target->dhost;
+ std::string mask = target->nick+"!"+target->ident+"@"+target->GetDisplayedHost();
std::string default_length = ServerInstance->Config->ConfValue("dccallow")->getString("length");
unsigned long length;
@@ -382,14 +382,14 @@ class ModuleDCCAllow : public Module
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->dhost + ") attempted to send you a file named " + filename + ", which was blocked.");
+ u->WriteNotice(user->nick + " (" + user->ident + "@" + user->GetDisplayedHost() + ") 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) && (stdalgo::string::equalsci(type, "CHAT")))
{
user->WriteNotice("The user " + u->nick + " is not accepting DCC CHAT requests from you.");
- u->WriteNotice(user->nick + " (" + user->ident + "@" + user->dhost + ") attempted to initiate a DCC CHAT session, which was blocked.");
+ u->WriteNotice(user->nick + " (" + user->ident + "@" + user->GetDisplayedHost() + ") 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;
}