]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sslmodes.cpp
Remove current time parameter of the Timer constructor
[user/henk/code/inspircd.git] / src / modules / m_sslmodes.cpp
index 1d29bb5e137333b1c2f73ffe2772fc20b3b58f33..6ac07434f7c0f9c2a7c615112ba35190042a4880 100644 (file)
@@ -52,9 +52,9 @@ class SSLMode : public ModeHandler
                                        for(UserMembCIter i = userlist->begin(); i != userlist->end(); i++)
                                        {
                                                ssl_cert* cert = API->GetCertificate(i->first);
-                                               if (!cert && !ServerInstance->ULine(i->first->server))
+                                               if (!cert && !i->first->server->IsULine())
                                                {
-                                                       source->WriteNumeric(ERR_ALLMUSTSSL, "%s %s :all members of the channel must be connected via SSL", source->nick.c_str(), channel->name.c_str());
+                                                       source->WriteNumeric(ERR_ALLMUSTSSL, "%s :all members of the channel must be connected via SSL", channel->name.c_str());
                                                        return MODEACTION_DENY;
                                                }
                                        }
@@ -91,13 +91,6 @@ class ModuleSSLModes : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               ServerInstance->Modules->AddService(sslm);
-               Implementation eventlist[] = { I_OnUserPreJoin, I_OnCheckBan, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-       }
-
        ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE
        {
                if(chan && chan->IsModeSet(sslm))
@@ -114,7 +107,7 @@ class ModuleSSLModes : public Module
                        else
                        {
                                // Deny
-                               user->WriteServ( "489 %s %s :Cannot join channel; SSL users only (+z)", user->nick.c_str(), cname.c_str());
+                               user->WriteNumeric(489, "%s :Cannot join channel; SSL users only (+z)", cname.c_str());
                                return MOD_RES_DENY;
                        }
                }