From 42d5b9571eff06b0c33093dc9118c29f9603fd2b Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 1 Jan 2007 20:53:20 +0000 Subject: Fix to allow for OnRehash to know what user initiated the rehash git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6207 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_filter_pcre.cpp | 4 ++-- src/modules/extra/m_mysql.cpp | 2 +- src/modules/extra/m_pgsql.cpp | 2 +- src/modules/extra/m_sqlauth.cpp | 4 ++-- src/modules/extra/m_sqllog.cpp | 4 ++-- src/modules/extra/m_sqloper.cpp | 4 ++-- src/modules/extra/m_ssl_gnutls.cpp | 4 ++-- src/modules/extra/m_ssl_openssl.cpp | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index c82207131..6d4964913 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -47,7 +47,7 @@ class ModuleFilterPCRE : public FilterBase ModuleFilterPCRE(InspIRCd* Me) : FilterBase::FilterBase(Me, "m_filter_pcre.so") { - OnRehash(""); + OnRehash(NULL,""); } virtual ~ModuleFilterPCRE() @@ -115,7 +115,7 @@ class ModuleFilterPCRE : public FilterBase } } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { ConfigReader MyConf(ServerInstance); diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index cebacde27..dd298bd1a 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -826,7 +826,7 @@ class ModuleSQL : public Module return NULL; } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { /* TODO: set rehash bool here, which makes the dispatcher thread rehash at next opportunity */ } diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index d688149b8..fb2cb2966 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -1079,7 +1079,7 @@ public: List[I_OnUnloadModule] = List[I_OnRequest] = List[I_OnRehash] = List[I_OnUserRegister] = List[I_OnCheckReady] = List[I_OnUserDisconnect] = 1; } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { ReadConf(); } diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index b2b7c9044..7130439e0 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -50,7 +50,7 @@ public: if (!SQLutils) throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqlauth.so."); - OnRehash(""); + OnRehash(NULL,""); } virtual ~ModuleSQLAuth() @@ -64,7 +64,7 @@ public: List[I_OnUserDisconnect] = List[I_OnCheckReady] = List[I_OnRequest] = List[I_OnRehash] = List[I_OnUserRegister] = 1; } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { ConfigReader Conf(Srv); diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 401db811c..78c2164aa 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -194,7 +194,7 @@ class ModuleSQLLog : public Module SQLModule = Srv->FindFeature("SQL"); - OnRehash(""); + OnRehash(NULL,""); MyMod = this; active_queries.clear(); } @@ -218,7 +218,7 @@ class ModuleSQLLog : public Module dbid = Conf.ReadValue("sqllog","dbid",0); // database id of a database configured in sql module } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { ReadConfig(); } diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index b7a45af45..ead9a4f36 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -42,7 +42,7 @@ public: if (!SQLutils) throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqloper.so."); - OnRehash(""); + OnRehash(NULL,""); } virtual ~ModuleSQLOper() @@ -56,7 +56,7 @@ public: List[I_OnRequest] = List[I_OnRehash] = List[I_OnPreCommand] = 1; } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { ConfigReader Conf(Srv); diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index fbd809742..9eec655f7 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -106,13 +106,13 @@ class ModuleSSLGnuTLS : public Module ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Failed to initialise DH parameters"); // Needs the flag as it ignores a plain /rehash - OnRehash("ssl"); + OnRehash(NULL,"ssl"); // Void return, guess we assume success gnutls_certificate_set_dh_params(x509_cred, dh_params); } - virtual void OnRehash(const std::string ¶m) + virtual void OnRehash(userrec* user, const std::string ¶m) { if(param != "ssl") return; diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index ca690fb8f..7ad78e2ea 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -133,10 +133,10 @@ class ModuleSSLOpenSSL : public Module SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, OnVerify); // Needs the flag as it ignores a plain /rehash - OnRehash("ssl"); + OnRehash(NULL,"ssl"); } - virtual void OnRehash(const std::string ¶m) + virtual void OnRehash(userrec* user, const std::string ¶m) { if (param != "ssl") return; -- cgit v1.2.3