]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sslmodes.cpp
AMD64 warning 'fix' which tested fine when I added it seems to now...stop things...
[user/henk/code/inspircd.git] / src / modules / m_sslmodes.cpp
index 3d5074c7049a2df9dc930168256ea5013a94a2b7..ed9d556716f7a789ee7b0bbd8f5dc61fda2af531 100644 (file)
@@ -24,12 +24,12 @@ class ModuleSSLModes : public Module
 
        virtual void On005Numeric(std::string &output)
        {
-               output.insert(output.find(" ", output.find("CHANMODES=", 0)), "z");
+               InsertMode(output, "z", 4);
        }
        
        virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
        {
-               if(chan && chan->IsCustomModeSet('z'))
+               if(chan && chan->IsModeSet('z'))
                {
                        if(user->GetExt("ssl"))
                        {
@@ -60,7 +60,7 @@ class ModuleSSLModes : public Module
                        {
                                if(!userlist[i]->GetExt("ssl"))
                                {
-                                       WriteServ(user->fd, "974 %s z :all members must be connected via SSL", user->nick);
+                                       WriteServ(user->fd, "490 %s %s :all members of the channel must be connected via SSL", user->nick, chan->name);
                                        return 0;
                                }
                        }