]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
kick_channel -> chanrec::KickUser(), server_kick_channel -> chanrec::ServerKickUser()
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index 717bbc4363f51a62371f8806919f9f6b41e618fd..1e1826b4199c0e3a0eb5b7f9e4e4beb5f28575d2 100644 (file)
@@ -290,7 +290,13 @@ class CloakUser : public ModeHandler
                /* Only opers can change other users modes */
                if ((source != dest) && (!*source->oper))
                        return MODEACTION_DENY;
-               
+
+               /* For remote clients, we dont take any action, we just allow it.
+                * The local server where they are will set their cloak instead.
+                */
+               if (!IS_LOCAL(dest))
+                       return MODEACTION_ALLOW;
+
                if (adding)
                {
                        if(!dest->IsModeSet('x'))
@@ -321,7 +327,7 @@ class CloakUser : public ModeHandler
                                        char ra[64];
                                        this->GenHash(dest->host,ra);
                                        std::string b = "";
-                                       in_addr testaddr;
+                                       insp_inaddr testaddr;
                                        std::string hostcloak = prefix + "-" + std::string(ra) + a;
                                
                                        /* Fix by brain - if the cloaked host is > the max length of a host (64 bytes