X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ircv3_chghost.cpp;h=a71737586abce34e3e8acdd95bf88ec3d3d92e52;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=fd142803f2444db8ac1681e4b474a56f4c14d0bd;hpb=77730fd5f09f8fc193205654c8bba84d34365670;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ircv3_chghost.cpp b/src/modules/m_ircv3_chghost.cpp index fd142803f..a71737586 100644 --- a/src/modules/m_ircv3_chghost.cpp +++ b/src/modules/m_ircv3_chghost.cpp @@ -1,7 +1,8 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2015 Attila Molnar + * Copyright (C) 2017-2019 Sadie Powell + * Copyright (C) 2015, 2017-2018 Attila Molnar * * 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 @@ -28,11 +29,14 @@ class ModuleIRCv3ChgHost : public Module void DoChgHost(User* user, const std::string& ident, const std::string& host) { + if (!(user->registered & REG_NICKUSER)) + return; + ClientProtocol::Message msg("CHGHOST", user); msg.PushParamRef(ident); msg.PushParamRef(host); ClientProtocol::Event protoev(protoevprov, msg); - IRCv3::WriteNeighborsWithCap(user, protoev, cap); + IRCv3::WriteNeighborsWithCap(user, protoev, cap, true); } public: @@ -54,7 +58,7 @@ class ModuleIRCv3ChgHost : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Provides the chghost IRCv3 extension", VF_VENDOR); + return Version("Provides the IRCv3 chghost client capability.", VF_VENDOR); } };