]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ircv3_chghost.cpp
Silence some GCC warnings.
[user/henk/code/inspircd.git] / src / modules / m_ircv3_chghost.cpp
index aa53612cb60533113d3ed83e967a3bec95baedf3..289f057530581f51132b288fc2776fdf933d31d5 100644 (file)
@@ -28,11 +28,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 +57,7 @@ class ModuleIRCv3ChgHost : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides the chghost IRCv3.2 extension", VF_VENDOR);
+               return Version("Provides the chghost IRCv3 extension", VF_VENDOR);
        }
 };