summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authoraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-12 01:42:11 +0000
committeraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-12 01:42:11 +0000
commit6ffca6b9565b04aa9a4ffb83732d2c077dfc681d (patch)
treed6ef6bf14a32b62a037508acf104db81ad0cbb03 /src/modules
parent6da3b9be51b97746af0aba5d98cf120e4f3cf57e (diff)
-Wshadow fixes for some modules in extra/
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8907 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp20
-rw-r--r--src/modules/extra/m_mysql.cpp4
-rw-r--r--src/modules/extra/m_pgsql.cpp20
-rw-r--r--src/modules/extra/m_sqlite3.cpp8
-rw-r--r--src/modules/extra/m_sqllog.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp8
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp8
7 files changed, 34 insertions, 36 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp
index 64bb949bc..b5c0c1762 100644
--- a/src/modules/extra/m_filter_pcre.cpp
+++ b/src/modules/extra/m_filter_pcre.cpp
@@ -32,8 +32,8 @@ class PCREFilter : public FilterResult
public:
pcre* regexp;
- PCREFilter(pcre* r, const std::string &rea, const std::string &act, long gline_time, const std::string &pat, const std::string &flags)
- : FilterResult(pat, rea, act, gline_time, flags), regexp(r)
+ PCREFilter(pcre* r, const std::string &rea, const std::string &act, long glinetime, const std::string &pat, const std::string &flgs)
+ : FilterResult(pat, rea, act, glinetime, flgs), regexp(r)
{
}
@@ -62,13 +62,13 @@ class ModuleFilterPCRE : public FilterBase
{
}
- virtual FilterResult* FilterMatch(User* user, const std::string &text, int flags)
+ virtual FilterResult* FilterMatch(User* user, const std::string &text, int flgs)
{
for (std::vector<PCREFilter>::iterator index = filters.begin(); index != filters.end(); index++)
{
/* Skip ones that dont apply to us */
- if (!FilterBase::AppliesToMe(user, dynamic_cast<FilterResult*>(&(*index)), flags))
+ if (!FilterBase::AppliesToMe(user, dynamic_cast<FilterResult*>(&(*index)), flgs))
continue;
if (pcre_exec(index->regexp, NULL, text.c_str(), text.length(), 0, 0, NULL, 0) > -1)
@@ -107,7 +107,7 @@ class ModuleFilterPCRE : public FilterBase
}
}
- virtual std::pair<bool, std::string> AddFilter(const std::string &freeform, const std::string &type, const std::string &reason, long duration, const std::string &flags)
+ virtual std::pair<bool, std::string> AddFilter(const std::string &freeform, const std::string &type, const std::string &reason, long duration, const std::string &flgs)
{
for (std::vector<PCREFilter>::iterator i = filters.begin(); i != filters.end(); i++)
{
@@ -127,7 +127,7 @@ class ModuleFilterPCRE : public FilterBase
}
else
{
- filters.push_back(PCREFilter(re, reason, type, duration, freeform, flags));
+ filters.push_back(PCREFilter(re, reason, type, duration, freeform, flgs));
return std::make_pair(true, "");
}
}
@@ -143,12 +143,12 @@ class ModuleFilterPCRE : public FilterBase
std::string pattern = MyConf.ReadValue("keyword", "pattern", index);
std::string reason = MyConf.ReadValue("keyword", "reason", index);
std::string action = MyConf.ReadValue("keyword", "action", index);
- std::string flags = MyConf.ReadValue("keyword", "flags", index);
+ std::string flgs = MyConf.ReadValue("keyword", "flags", index);
long gline_time = ServerInstance->Duration(MyConf.ReadValue("keyword", "duration", index));
if (action.empty())
action = "none";
- if (flags.empty())
- flags = "*";
+ if (flgs.empty())
+ flgs = "*";
re = pcre_compile(pattern.c_str(),0,&error,&erroffset,NULL);
@@ -159,7 +159,7 @@ class ModuleFilterPCRE : public FilterBase
}
else
{
- filters.push_back(PCREFilter(re, reason, action, gline_time, pattern, flags));
+ filters.push_back(PCREFilter(re, reason, action, gline_time, pattern, flgs));
ServerInstance->Log(DEFAULT,"Regular expression %s loaded.", pattern.c_str());
}
}
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 5ce87c4b4..3a6f2afee 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -99,7 +99,7 @@ class MySQLresult : public SQLresult
int rows;
public:
- MySQLresult(Module* self, Module* to, MYSQL_RES* res, int affected_rows, unsigned int id) : SQLresult(self, to, id), currentrow(0), fieldmap(NULL)
+ MySQLresult(Module* self, Module* to, MYSQL_RES* res, int affected_rows, unsigned int rid) : SQLresult(self, to, rid), currentrow(0), fieldmap(NULL)
{
/* A number of affected rows from from mysql_affected_rows.
*/
@@ -145,7 +145,7 @@ class MySQLresult : public SQLresult
}
}
- MySQLresult(Module* self, Module* to, SQLerror e, unsigned int id) : SQLresult(self, to, id), currentrow(0)
+ MySQLresult(Module* self, Module* to, SQLerror e, unsigned int rid) : SQLresult(self, to, rid), currentrow(0)
{
rows = 0;
error = e;
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 1e8813e2e..8320c9408 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -132,8 +132,8 @@ class PgSQLresult : public SQLresult
SQLfieldList* fieldlist;
SQLfieldMap* fieldmap;
public:
- PgSQLresult(Module* self, Module* to, unsigned long id, PGresult* result)
- : SQLresult(self, to, id), res(result), currentrow(0), fieldlist(NULL), fieldmap(NULL)
+ PgSQLresult(Module* self, Module* to, unsigned long rid, PGresult* result)
+ : SQLresult(self, to, rid), res(result), currentrow(0), fieldlist(NULL), fieldmap(NULL)
{
rows = PQntuples(res);
cols = PQnfields(res);
@@ -219,9 +219,9 @@ public:
if(currentrow < PQntuples(res))
{
- int cols = PQnfields(res);
+ int ncols = PQnfields(res);
- for(int i = 0; i < cols; i++)
+ for(int i = 0; i < ncols; i++)
{
fieldlist->push_back(GetValue(currentrow, i));
}
@@ -248,9 +248,9 @@ public:
if(currentrow < PQntuples(res))
{
- int cols = PQnfields(res);
+ int ncols = PQnfields(res);
- for(int i = 0; i < cols; i++)
+ for(int i = 0; i < ncols; i++)
{
fieldmap->insert(std::make_pair(ColName(i), GetValue(currentrow, i)));
}
@@ -267,9 +267,9 @@ public:
if(currentrow < PQntuples(res))
{
- int cols = PQnfields(res);
+ int ncols = PQnfields(res);
- for(int i = 0; i < cols; i++)
+ for(int i = 0; i < ncols; i++)
{
fl->push_back(GetValue(currentrow, i));
}
@@ -286,9 +286,9 @@ public:
if(currentrow < PQntuples(res))
{
- int cols = PQnfields(res);
+ int ncols = PQnfields(res);
- for(int i = 0; i < cols; i++)
+ for(int i = 0; i < ncols; i++)
{
fm->insert(std::make_pair(ColName(i), GetValue(currentrow, i)));
}
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp
index 0720f8c93..2c2d6ecf5 100644
--- a/src/modules/extra/m_sqlite3.cpp
+++ b/src/modules/extra/m_sqlite3.cpp
@@ -96,8 +96,8 @@ class SQLite3Result : public SQLresult
SQLfieldMap* fieldmap;
public:
- SQLite3Result(Module* self, Module* to, unsigned int id)
- : SQLresult(self, to, id), currentrow(0), rows(0), cols(0), fieldlist(NULL), fieldmap(NULL)
+ SQLite3Result(Module* self, Module* to, unsigned int rid)
+ : SQLresult(self, to, rid), currentrow(0), rows(0), cols(0), fieldlist(NULL), fieldmap(NULL)
{
}
@@ -105,7 +105,7 @@ class SQLite3Result : public SQLresult
{
}
- void AddRow(int colsnum, char **data, char **colname)
+ void AddRow(int colsnum, char **dat, char **colname)
{
colnames.clear();
cols = colsnum;
@@ -113,7 +113,7 @@ class SQLite3Result : public SQLresult
{
fieldlists.resize(fieldlists.size()+1);
colnames.push_back(colname[i]);
- SQLfield sf(data[i] ? data[i] : "", data[i] ? false : true);
+ SQLfield sf(dat[i] ? dat[i] : "", dat[i] ? false : true);
fieldlists[rows].push_back(sf);
}
rows++;
diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp
index cc63a73d6..799744c26 100644
--- a/src/modules/extra/m_sqllog.cpp
+++ b/src/modules/extra/m_sqllog.cpp
@@ -182,7 +182,6 @@ public:
class ModuleSQLLog : public Module
{
- ConfigReader* Conf;
public:
ModuleSQLLog(InspIRCd* Me)
@@ -237,7 +236,6 @@ class ModuleSQLLog : public Module
if (n != active_queries.end())
{
n->second->Go(res);
- std::map<unsigned long, QueryInfo*>::iterator n = active_queries.find(res->id);
active_queries.erase(n);
}
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 554dd17dd..e2bf9cfac 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -128,14 +128,14 @@ class ModuleSSLGnuTLS : public Module
clientactive = 0;
sslports.clear();
- for(int i = 0; i < Conf->Enumerate("bind"); i++)
+ for(int index = 0; index < Conf->Enumerate("bind"); index++)
{
// For each <bind> tag
- std::string x = Conf->ReadValue("bind", "type", i);
- if(((x.empty()) || (x == "clients")) && (Conf->ReadValue("bind", "ssl", i) == "gnutls"))
+ std::string x = Conf->ReadValue("bind", "type", index);
+ if(((x.empty()) || (x == "clients")) && (Conf->ReadValue("bind", "ssl", index) == "gnutls"))
{
// Get the port we're meant to be listening on with SSL
- std::string port = Conf->ReadValue("bind", "port", i);
+ std::string port = Conf->ReadValue("bind", "port", index);
irc::portparser portrange(port, false);
long portno = -1;
while ((portno = portrange.GetToken()))
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index dfecc1254..faeb24410 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -167,14 +167,14 @@ class ModuleSSLOpenSSL : public Module
clientactive = 0;
sslports.clear();
- for (int i = 0; i < Conf.Enumerate("bind"); i++)
+ for (int index = 0; index < Conf.Enumerate("bind"); index++)
{
// For each <bind> tag
- std::string x = Conf.ReadValue("bind", "type", i);
- if (((x.empty()) || (x == "clients")) && (Conf.ReadValue("bind", "ssl", i) == "openssl"))
+ std::string x = Conf.ReadValue("bind", "type", index);
+ if (((x.empty()) || (x == "clients")) && (Conf.ReadValue("bind", "ssl", index) == "openssl"))
{
// Get the port we're meant to be listening on with SSL
- std::string port = Conf.ReadValue("bind", "port", i);
+ std::string port = Conf.ReadValue("bind", "port", index);
irc::portparser portrange(port, false);
long portno = -1;
while ((portno = portrange.GetToken()))