]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ircv3_chghost.cpp
Only send ACCOUNT and CHGHOST to clients that have sent NICK/USER.
[user/henk/code/inspircd.git] / src / modules / m_ircv3_chghost.cpp
index fd142803f2444db8ac1681e4b474a56f4c14d0bd..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: