X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_xline%2Fcore_xline.cpp;h=13bc68a5f6319b4cbf4099906082a42bb645b153;hb=b4a174ee9c32d62ea6bf010e837e8c5b1c3d36a3;hp=568b7d2693e2a96bf0c4e167e80fdf4a6722ea17;hpb=aa692dc1039b63deef7886e914ec499abe7facaf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_xline/core_xline.cpp b/src/coremods/core_xline/core_xline.cpp index 568b7d269..13bc68a5f 100644 --- a/src/coremods/core_xline/core_xline.cpp +++ b/src/coremods/core_xline/core_xline.cpp @@ -2,9 +2,9 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 linuxdaemon + * Copyright (C) 2019 Robby * Copyright (C) 2019 Matt Schatz - * Copyright (C) 2018-2019 Robby - * Copyright (C) 2017-2019 Sadie Powell + * Copyright (C) 2017-2021 Sadie Powell * Copyright (C) 2014, 2016 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -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) @@ -88,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()); }