summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-10-06 10:31:09 +0100
committerSadie Powell <sadie@witchery.services>2020-10-06 10:31:39 +0100
commite81dcaec7f8d3032b1931c8aa24cc945dac4c3a3 (patch)
treef9a3d87767f59a41d5b21ecd9c6cc92fd57726f3 /src/coremods
parent563be03c8c41014b18609d1bbb10b2d00ac7d315 (diff)
Recheck users for xlines when their real hostname changes.
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_xline/core_xline.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/coremods/core_xline/core_xline.cpp b/src/coremods/core_xline/core_xline.cpp
index 568b7d269..7a53f8566 100644
--- a/src/coremods/core_xline/core_xline.cpp
+++ b/src/coremods/core_xline/core_xline.cpp
@@ -77,6 +77,16 @@ class CoreModXLine : public Module
user->CheckLines(true);
}
+ void OnChangeRealHost(User* user, const std::string& newhost) CXX11_OVERRIDE
+ {
+ LocalUser* luser = IS_LOCAL(user);
+ if (!luser || luser->quitting)
+ return;
+
+ luser->exempt = (ServerInstance->XLines->MatchesLine("E", user) != NULL);
+ luser->CheckLines(false);
+ }
+
ModResult OnUserPreNick(LocalUser* user, const std::string& newnick) CXX11_OVERRIDE
{
// Check Q-lines (for local nick changes only, remote servers have our Q-lines to enforce themselves)