diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_filter_pcre.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_opersha256.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sql.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqlauth.cpp | 4 | ||||
-rw-r--r-- | src/modules/extra/m_sqllog.cpp | 18 | ||||
-rw-r--r-- | src/modules/extra/m_sqloper.cpp | 6 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 10 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 2 |
9 files changed, 28 insertions, 28 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index 638c1bd24..ff87d7e8a 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -152,7 +152,7 @@ class ModuleFilterPCRE : public Module return 0; } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { // reload our config file on rehash - we must destroy and re-allocate the classes // to call the constructor again and re-read our data. diff --git a/src/modules/extra/m_opersha256.cpp b/src/modules/extra/m_opersha256.cpp index 04d00f7b4..82caa9d12 100644 --- a/src/modules/extra/m_opersha256.cpp +++ b/src/modules/extra/m_opersha256.cpp @@ -253,7 +253,7 @@ public: List[I_OnOperCompare] = 1; } - virtual int OnOperCompare(std::string data, std::string input) + virtual int OnOperCompare(const std::string &data, const std::string &input) { if (data.length() == SHA256_BLOCK_SIZE) // If the data is as long as a hex sha256 hash, try it as that { diff --git a/src/modules/extra/m_sql.cpp b/src/modules/extra/m_sql.cpp index de96c5a93..515ce792d 100644 --- a/src/modules/extra/m_sql.cpp +++ b/src/modules/extra/m_sql.cpp @@ -336,7 +336,7 @@ class ModuleSQL : public Module delete Conf; } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { delete Conf; Conf = new ConfigReader(); diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index 6a760e198..3112c2cae 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -87,7 +87,7 @@ class ModuleSQLAuth : public Module List[I_OnRehash] = List[I_OnUserRegister] = 1; } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { ReadConfig(); } @@ -105,7 +105,7 @@ class ModuleSQLAuth : public Module } } - bool CheckCredentials(std::string username, std::string password) + bool CheckCredentials(const std::string &username, const std::string &password) { bool found = false; diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 48b846fee..c9a86e9bc 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -71,12 +71,12 @@ class ModuleSQLLog : public Module List[I_OnUserQuit] = List[I_OnLoadModule] = 1; } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { ReadConfig(); } - long InsertNick(std::string nick) + long InsertNick(const std::string &nick) { long nid = -1; SQLRequest* query = new SQLRequest(SQL_RESULT,dbid,"SELECT id,actor FROM ircd_log_actors WHERE actor='"+nick+"'"); @@ -136,7 +136,7 @@ class ModuleSQLLog : public Module return; } - long InsertHost(std::string host) + long InsertHost(const std::string &host) { long hid = -1; SQLRequest* query = new SQLRequest(SQL_RESULT,dbid,"SELECT id,hostname FROM ircd_log_hosts WHERE hostname='"+host+"'"); @@ -178,7 +178,7 @@ class ModuleSQLLog : public Module return hid; } - void AddLogEntry(int category, std::string nick, std::string host, std::string source) + void AddLogEntry(int category, const std::string &nick, const std::string &host, const std::string &source) { // is the sql module loaded? If not, we don't attempt to do anything. if (!SQLModule) @@ -190,7 +190,7 @@ class ModuleSQLLog : public Module InsertEntry((unsigned)category,(unsigned)nickid,(unsigned)hostid,(unsigned)sourceid,(unsigned long)time(NULL)); } - virtual void OnOper(userrec* user, std::string opertype) + virtual void OnOper(userrec* user, const std::string &opertype) { AddLogEntry(LT_OPER,user->nick,user->host,user->server); } @@ -200,13 +200,13 @@ class ModuleSQLLog : public Module AddLogEntry(LT_OPER,user->nick,user->host,user->server); } - virtual int OnKill(userrec* source, userrec* dest, std::string reason) + virtual int OnKill(userrec* source, userrec* dest, const std::string &reason) { AddLogEntry(LT_KILL,dest->nick,dest->host,source->nick); return 0; } - virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) + virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated) { if ((command == "GLINE") || (command == "KLINE") || (command == "ELINE") || (command == "ZLINE")) { @@ -225,12 +225,12 @@ class ModuleSQLLog : public Module AddLogEntry(LT_CONNECT,user->nick,user->host,user->server); } - virtual void OnUserQuit(userrec* user, std::string reason) + virtual void OnUserQuit(userrec* user, const std::string &reason) { AddLogEntry(LT_DISCONNECT,user->nick,user->host,user->server); } - virtual void OnLoadModule(Module* mod,std::string name) + virtual void OnLoadModule(Module* mod, const std::string &name) { AddLogEntry(LT_LOADMODULE,name,Srv->GetServerName(),Srv->GetServerName()); } diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index f1d54e70a..42746ea01 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -69,7 +69,7 @@ class ModuleSQLOper : public Module ReadConfig(); } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { delete Conf; Conf = new ConfigReader(); @@ -81,7 +81,7 @@ class ModuleSQLOper : public Module List[I_OnRehash] = List[I_OnPreCommand] = 1; } - virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user, bool validated) + virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated) { if ((command == "OPER") && (validated)) { @@ -91,7 +91,7 @@ class ModuleSQLOper : public Module return 0; } - bool LookupOper(std::string username, std::string password, userrec* user) + bool LookupOper(const std::string &username, const std::string &password, userrec* user) { bool found = false; diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 93b904958..5155b4f6c 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -86,7 +86,7 @@ class ModuleSSLGnuTLS : public Module gnutls_certificate_set_dh_params(x509_cred, dh_params); } - virtual void OnRehash(std::string param) + virtual void OnRehash(const std::string ¶m) { if(param != "ssl") return; @@ -210,7 +210,7 @@ class ModuleSSLGnuTLS : public Module } } - virtual void OnUnloadModule(Module* mod, std::string name) + virtual void OnUnloadModule(Module* mod, const std::string &name) { if(mod == this) { @@ -234,7 +234,7 @@ class ModuleSSLGnuTLS : 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]; @@ -455,7 +455,7 @@ class ModuleSSLGnuTLS : 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") @@ -470,7 +470,7 @@ class ModuleSSLGnuTLS : 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")) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 8b6404763..880bbd1a3 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -96,7 +96,7 @@ class ModuleSSLOpenSSL : public Module OnRehash("ssl"); } - virtual void OnRehash(std::string param) + virtual void OnRehash(const std::string ¶m) { 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, 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")) diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 1731da798..e08ba479c 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -124,7 +124,7 @@ class ModuleFilter : public Module return 0; } - virtual void OnRehash(std::string parameter) + virtual void OnRehash(const std::string ¶meter) { // reload our config file on rehash - we must destroy and re-allocate the classes // to call the constructor again and re-read our data. |