]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_xline/core_xline.cpp
Fix sending Q-line notices to snomask `a` instead of snomask `x`.
[user/henk/code/inspircd.git] / src / coremods / core_xline / core_xline.cpp
index 2a84458972e2ba2620126161006895f205d0ad90..32c1dea3f0c4b2f4cf2449e4be724d9e5c36b890 100644 (file)
@@ -1,7 +1,11 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2019 linuxdaemon <linuxdaemon.irc@gmail.com>
+ *   Copyright (C) 2019 Matt Schatz <genius3000@g3k.solutions>
+ *   Copyright (C) 2018-2019 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2017-2020 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2014, 2016 Attila Molnar <attilamolnar@hush.com>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -73,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)
@@ -84,7 +98,7 @@ class CoreModXLine : public Module
                // A Q-line matched the new nick, tell opers if the user is registered
                if (user->registered == REG_ALL)
                {
-                       ServerInstance->SNO->WriteGlobalSno('a', "Q-lined nickname %s from %s: %s",
+                       ServerInstance->SNO->WriteGlobalSno('x', "Q-lined nickname %s from %s: %s",
                                newnick.c_str(), user->GetFullRealHost().c_str(), xline->reason.c_str());
                }