]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_openssl.cpp
AMD64 warning 'fix' which tested fine when I added it seems to now...stop things...
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_openssl.cpp
index 3a0a014095f1da61107b7d47e7208939dab585d0..3048795dcc523180442e95f1f0accfa6725ff0d1 100644 (file)
@@ -96,7 +96,7 @@ class ModuleSSLOpenSSL : public Module
                OnRehash("ssl");
        }
        
-       virtual void OnRehash(std::string param)
+       virtual void OnRehash(const std::string &param)
        {
                if(param != "ssl")
                        return;
@@ -233,7 +233,7 @@ class ModuleSSLOpenSSL : public Module
                }
        }
        
-       virtual void OnUnloadModule(Module* mod, std::string name)
+       virtual void OnUnloadModule(Module* mod, const std::string &name)
        {
                if(mod == this)
                {
@@ -257,7 +257,7 @@ class ModuleSSLOpenSSL : public Module
                List[I_OnSyncUserMetaData] = List[I_OnDecodeMetaData] = List[I_OnUnloadModule] = List[I_OnRehash] = List[I_OnWhois] = List[I_OnGlobalConnect] = 1;
        }
 
-       virtual void OnRawSocketAccept(int fd, std::string ip, int localport)
+       virtual void OnRawSocketAccept(int fd, const std::string &ip, int localport)
        {
                issl_session* session = &sessions[fd];
        
@@ -535,7 +535,7 @@ class ModuleSSLOpenSSL : public Module
                }
        }
        
-       virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, std::string extname)
+       virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname)
        {
                // check if the linking module wants to know about OUR metadata
                if(extname == "ssl")
@@ -550,7 +550,7 @@ class ModuleSSLOpenSSL : public Module
                }
        }
        
-       virtual void OnDecodeMetaData(int target_type, void* target, std::string extname, std::string extdata)
+       virtual void OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata)
        {
                // check if its our metadata key, and its associated with a user
                if ((target_type == TYPE_USER) && (extname == "ssl"))
@@ -602,7 +602,8 @@ class ModuleSSLOpenSSL : public Module
                        userrec* u = Srv->FindDescriptor(session->fd);
                        if (u)
                        {
-                               u->Extend("ssl", "ON");
+                               if (!u->GetExt("ssl"))
+                                       u->Extend("ssl", "ON");
                        }
                        
                        session->status = ISSL_OPEN;