]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
m_operjoin Remove duplicated code
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index bef4e94b82ab2982937dcb85cd0541238a640dda..5d62c9cf67984d93cdafbaa3f142573ab895a13b 100644 (file)
@@ -99,7 +99,7 @@ class CloakUser : public ModeHandler
                        }
                        if (cloak)
                        {
-                               user->ChangeDisplayedHost(cloak->c_str());
+                               user->ChangeDisplayedHost(*cloak);
                                user->SetMode(this, true);
                                return MODEACTION_ALLOW;
                        }
@@ -146,13 +146,6 @@ class ModuleCloaking : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               ServerInstance->Modules->AddService(cu);
-               ServerInstance->Modules->AddService(ck);
-               ServerInstance->Modules->AddService(cu.ext);
-       }
-
        /** This function takes a domain name string and returns just the last two domain parts,
         * or the last domain part if only two are available. Failing that it just returns what it was given.
         *
@@ -308,7 +301,7 @@ class ModuleCloaking : public Module
                if (u->IsModeSet(cu))
                {
                        u->SetMode(cu, false);
-                       u->WriteServ("MODE %s -%c", u->nick.c_str(), cu.GetModeChar());
+                       u->WriteCommand("MODE", "-" + ConvToStr(cu.GetModeChar()));
                }
        }