summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-01 21:56:13 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-01 21:56:13 +0200
commit26e7bb0b9a17a595d9935a1cae41b44504ad213e (patch)
tree904734f67485d62de90c35abbb522ad0e84cb862 /src/modules/extra
parent8584cc23f4bd6515acef65fc82a15dc1f53127b2 (diff)
Whitespace and empty destructor removal, minor coding style changes
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_geoip.cpp1
-rw-r--r--src/modules/extra/m_ldapauth.cpp1
-rw-r--r--src/modules/extra/m_mssql.cpp4
-rw-r--r--src/modules/extra/m_mysql.cpp4
-rw-r--r--src/modules/extra/m_pgsql.cpp4
-rw-r--r--src/modules/extra/m_regex_pcre.cpp10
-rw-r--r--src/modules/extra/m_regex_posix.cpp11
-rw-r--r--src/modules/extra/m_regex_stdlib.cpp17
-rw-r--r--src/modules/extra/m_regex_tre.cpp16
-rw-r--r--src/modules/extra/m_sqlite3.cpp10
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp2
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp2
12 files changed, 28 insertions, 54 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index c93479b3c..9dd682118 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -128,4 +128,3 @@ class ModuleGeoIP : public Module
};
MODULE_INIT(ModuleGeoIP)
-
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp
index 5b3f1e7cc..0eb182228 100644
--- a/src/modules/extra/m_ldapauth.cpp
+++ b/src/modules/extra/m_ldapauth.cpp
@@ -430,7 +430,6 @@ public:
{
return Version("Allow/Deny connections based upon answer from LDAP server", VF_VENDOR);
}
-
};
MODULE_INIT(ModuleLDAPAuth)
diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp
index 598f9aac9..3ba398783 100644
--- a/src/modules/extra/m_mssql.cpp
+++ b/src/modules/extra/m_mssql.cpp
@@ -88,10 +88,6 @@ class MsSQLResult : public SQLresult
{
}
- ~MsSQLResult()
- {
- }
-
void AddRow(int colsnum, char **dat, char **colname)
{
colnames.clear();
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 682f041ad..b71c3543e 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -189,10 +189,6 @@ class MySQLresult : public SQLResult
}
- ~MySQLresult()
- {
- }
-
virtual int Rows()
{
return rows;
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 7751f9b82..84f159be1 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -504,10 +504,6 @@ class ModulePgSQL : public Module
ConnMap connections;
ReconnectTimer* retimer;
- ModulePgSQL()
- {
- }
-
void init()
{
ReadConf();
diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp
index cba234c8c..a23092879 100644
--- a/src/modules/extra/m_regex_pcre.cpp
+++ b/src/modules/extra/m_regex_pcre.cpp
@@ -33,7 +33,7 @@
class PCREException : public ModuleException
{
-public:
+ public:
PCREException(const std::string& rx, const std::string& error, int erroffset)
: ModuleException("Error in regex " + rx + " at offset " + ConvToStr(erroffset) + ": " + error)
{
@@ -42,10 +42,9 @@ public:
class PCRERegex : public Regex
{
-private:
pcre* regex;
-public:
+ public:
PCRERegex(const std::string& rx) : Regex(rx)
{
const char* error;
@@ -86,9 +85,10 @@ class PCREFactory : public RegexFactory
class ModuleRegexPCRE : public Module
{
-public:
+ public:
PCREFactory ref;
- ModuleRegexPCRE() : ref(this) {
+ ModuleRegexPCRE() : ref(this)
+ {
ServerInstance->Modules->AddService(ref);
}
diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp
index b3afd60c8..513f54cfc 100644
--- a/src/modules/extra/m_regex_posix.cpp
+++ b/src/modules/extra/m_regex_posix.cpp
@@ -28,7 +28,7 @@
class POSIXRegexException : public ModuleException
{
-public:
+ public:
POSIXRegexException(const std::string& rx, const std::string& error)
: ModuleException("Error in regex " + rx + ": " + error)
{
@@ -37,10 +37,9 @@ public:
class POSIXRegex : public Regex
{
-private:
regex_t regbuf;
-public:
+ public:
POSIXRegex(const std::string& rx, bool extended) : Regex(rx)
{
int flags = (extended ? REG_EXTENDED : 0) | REG_NOSUB;
@@ -92,8 +91,10 @@ class PosixFactory : public RegexFactory
class ModuleRegexPOSIX : public Module
{
PosixFactory ref;
-public:
- ModuleRegexPOSIX() : ref(this) {
+
+ public:
+ ModuleRegexPOSIX() : ref(this)
+ {
ServerInstance->Modules->AddService(ref);
Implementation eventlist[] = { I_OnRehash };
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
diff --git a/src/modules/extra/m_regex_stdlib.cpp b/src/modules/extra/m_regex_stdlib.cpp
index 204728b65..64d479cbc 100644
--- a/src/modules/extra/m_regex_stdlib.cpp
+++ b/src/modules/extra/m_regex_stdlib.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
+
#include "inspircd.h"
#include "m_regex.h"
#include <regex>
@@ -29,7 +29,7 @@
class StdRegexException : public ModuleException
{
-public:
+ public:
StdRegexException(const std::string& rx, const std::string& error)
: ModuleException(std::string("Error in regex ") + rx + ": " + error)
{
@@ -38,9 +38,9 @@ public:
class StdRegex : public Regex
{
-private:
std::regex regexcl;
-public:
+
+ public:
StdRegex(const std::string& rx, std::regex::flag_type fltype) : Regex(rx)
{
try{
@@ -51,7 +51,7 @@ public:
throw StdRegexException(rx, rxerr.what());
}
}
-
+
virtual bool Matches(const std::string& text)
{
return std::regex_search(text, regexcl);
@@ -73,7 +73,8 @@ class ModuleRegexStd : public Module
{
public:
StdRegexFactory ref;
- ModuleRegexStd() : ref(this) {
+ ModuleRegexStd() : ref(this)
+ {
ServerInstance->Modules->AddService(ref);
Implementation eventlist[] = { I_OnRehash };
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
@@ -84,12 +85,12 @@ public:
{
return Version("Regex Provider Module for std::regex", VF_VENDOR);
}
-
+
void OnRehash(User* u)
{
ConfigTag* Conf = ServerInstance->Config->ConfValue("stdregex");
std::string regextype = Conf->getString("type", "ecmascript");
-
+
if(regextype == "bre")
ref.regextype = std::regex::basic;
else if(regextype == "ere")
diff --git a/src/modules/extra/m_regex_tre.cpp b/src/modules/extra/m_regex_tre.cpp
index 4b9eab472..b5bd7d012 100644
--- a/src/modules/extra/m_regex_tre.cpp
+++ b/src/modules/extra/m_regex_tre.cpp
@@ -30,7 +30,7 @@
class TRERegexException : public ModuleException
{
-public:
+ public:
TRERegexException(const std::string& rx, const std::string& error)
: ModuleException("Error in regex " + rx + ": " + error)
{
@@ -39,7 +39,6 @@ public:
class TRERegex : public Regex
{
-private:
regex_t regbuf;
public:
@@ -80,7 +79,8 @@ public:
}
};
-class TREFactory : public RegexFactory {
+class TREFactory : public RegexFactory
+{
public:
TREFactory(Module* m) : RegexFactory(m, "regex/tre") {}
Regex* Create(const std::string& expr)
@@ -92,8 +92,10 @@ class TREFactory : public RegexFactory {
class ModuleRegexTRE : public Module
{
TREFactory trf;
-public:
- ModuleRegexTRE() : trf(this) {
+
+ public:
+ ModuleRegexTRE() : trf(this)
+ {
ServerInstance->Modules->AddService(trf);
}
@@ -101,10 +103,6 @@ public:
{
return Version("Regex Provider Module for TRE Regular Expressions", VF_VENDOR);
}
-
- ~ModuleRegexTRE()
- {
- }
};
MODULE_INIT(ModuleRegexTRE)
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp
index 7f6a53359..171c11f03 100644
--- a/src/modules/extra/m_sqlite3.cpp
+++ b/src/modules/extra/m_sqlite3.cpp
@@ -48,10 +48,6 @@ class SQLite3Result : public SQLResult
{
}
- ~SQLite3Result()
- {
- }
-
virtual int Rows()
{
return rows;
@@ -80,7 +76,6 @@ class SQLite3Result : public SQLResult
class SQLConn : public SQLProvider
{
- private:
sqlite3* conn;
reference<ConfigTag> config;
@@ -206,14 +201,9 @@ class SQLConn : public SQLProvider
class ModuleSQLite3 : public Module
{
- private:
ConnMap conns;
public:
- ModuleSQLite3()
- {
- }
-
void init()
{
ReadConf();
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 38b3700b5..39602539f 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -202,7 +202,6 @@ class ModuleSSLGnuTLS : public Module
}
public:
-
ModuleSSLGnuTLS()
: starttls(this), capHandler(this, "tls"), iohook(this, "ssl/gnutls", SERVICE_IOHOOK)
{
@@ -472,7 +471,6 @@ class ModuleSSLGnuTLS : public Module
return Version("Provides SSL support for clients", VF_VENDOR);
}
-
void On005Numeric(std::string &output)
{
if (!sslports.empty())
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index b63fcd376..bf4a9b215 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -29,7 +29,7 @@
# define __AVAILABILITYMACROS__
# define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
#endif
-
+
#include "inspircd.h"
#include <openssl/ssl.h>
#include <openssl/err.h>