]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ircv3_chghost.cpp
Fix the cloaking module on C++98 compilers.
[user/henk/code/inspircd.git] / src / modules / m_ircv3_chghost.cpp
index d786891782b3548dadf3845fd2c95b15a0b2c7e3..3c02b20f5721459e537fd3ded7e53d123a950909 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2015 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2017-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2015, 2018 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
@@ -28,6 +29,9 @@ 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);
@@ -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);
        }
 };