summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp2
-rw-r--r--src/hashcomp.cpp6
-rw-r--r--src/modules.cpp2
-rw-r--r--src/modules/m_alltime.cpp4
-rw-r--r--src/modules/m_conn_join.cpp8
-rw-r--r--src/modules/m_conn_umodes.cpp4
-rw-r--r--src/modules/m_deaf.cpp4
-rw-r--r--src/modules/m_filter.h2
-rw-r--r--src/modules/m_http_client.cpp10
-rw-r--r--src/modules/m_operjoin.cpp8
-rw-r--r--src/modules/m_opermodes.cpp4
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp2
-rw-r--r--src/modules/m_spanningtree/utils.h4
-rw-r--r--src/server.cpp4
14 files changed, 31 insertions, 33 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 945780a54..f083f7895 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -335,7 +335,7 @@ bool ValidateDnsServer(ServerConfig* conf, const char*, const char*, ValueItem &
std::string nameserver;
// attempt to look up their nameserver from /etc/resolv.conf
conf->GetInstance()->Log(DEFAULT,"WARNING: <dns:server> not defined, attempting to find working server in /etc/resolv.conf...");
- ifstream resolv("/etc/resolv.conf");
+ std::ifstream resolv("/etc/resolv.conf");
bool found_server = false;
if (resolv.is_open())
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 15be92bd7..f73a6f1c1 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -49,8 +49,6 @@ using stdext::hash_map;
*
******************************************************/
-using namespace irc::sockets;
-
/* convert a string to lowercase. Note following special circumstances
* taken from RFC 1459. Many "official" server branches still hold to this
* rule so i will too;
@@ -70,9 +68,9 @@ void nspace::strlower(char *n)
}
#ifndef WIN32
-size_t nspace::hash<string>::operator()(const string &s) const
+size_t nspace::hash<std::string>::operator()(const std::string &s) const
#else
-size_t nspace::hash_compare<string, std::less<string> >::operator()(const string &s) const
+size_t nspace::hash_compare<string, std::less<std::string> >::operator()(const std::string &s) const
#endif
{
/* XXX: NO DATA COPIES! :)
diff --git a/src/modules.cpp b/src/modules.cpp
index 6cc1a3450..0142749cf 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -744,7 +744,7 @@ void InspIRCd::SendMode(const char** parameters, int pcnt, User *user)
this->Modes->Process(parameters,pcnt,user,true);
}
-void InspIRCd::DumpText(User* User, const std::string &LinePrefix, stringstream &TextStream)
+void InspIRCd::DumpText(User* User, const std::string &LinePrefix, std::stringstream &TextStream)
{
std::string CompleteLine = LinePrefix;
std::string Word;
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index aa244b45d..602646ebd 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -36,7 +36,7 @@ class CommandAlltime : public Command
int delta = ServerInstance->GetTimeDelta();
- string msg = ":" + string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time for " +
+ std::string msg = ":" + std::string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time for " +
ServerInstance->Config->ServerName + " is: " + fmtdate + " (delta " + ConvToStr(delta) + " seconds): Time with delta: "+ fmtdate2;
if (IS_LOCAL(user))
@@ -45,7 +45,7 @@ class CommandAlltime : public Command
}
else
{
- deque<string> params;
+ std::deque<std::string> params;
params.push_back(user->nick);
params.push_back(msg);
Event ev((char *) &params, NULL, "send_push");
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index bdd8f43ea..b3be3932b 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -22,14 +22,14 @@ class ModuleConnJoin : public Module
std::vector<std::string> Joinchans;
- int tokenize(const string &str, std::vector<std::string> &tokens)
+ int tokenize(const std::string &str, std::vector<std::string> &tokens)
{
// skip delimiters at beginning.
- string::size_type lastPos = str.find_first_not_of(",", 0);
+ std::string::size_type lastPos = str.find_first_not_of(",", 0);
// find first "non-delimiter".
- string::size_type pos = str.find_first_of(",", lastPos);
+ std::string::size_type pos = str.find_first_of(",", lastPos);
- while (string::npos != pos || string::npos != lastPos)
+ while (std::string::npos != pos || std::string::npos != lastPos)
{
// found a token, add it to the vector.
tokens.push_back(str.substr(lastPos, pos - lastPos));
diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp
index 6ba965d61..bfae76f1b 100644
--- a/src/modules/m_conn_umodes.cpp
+++ b/src/modules/m_conn_umodes.cpp
@@ -63,9 +63,9 @@ class ModuleModesOnConnect : public Module
if (!ThisModes.empty())
{
std::string buf;
- stringstream ss(ThisModes);
+ std::stringstream ss(ThisModes);
- vector<string> tokens;
+ std::vector<std::string> tokens;
// split ThisUserModes into modes and mode params
while (ss >> buf)
diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp
index 5d648cff9..ed110d6c9 100644
--- a/src/modules/m_deaf.cpp
+++ b/src/modules/m_deaf.cpp
@@ -118,13 +118,13 @@ class ModuleDeaf : public Module
if (!deaf_bypasschars.empty())
{
is_bypasschar_avail = 1;
- if (deaf_bypasschars.find(text[0], 0) != string::npos)
+ if (deaf_bypasschars.find(text[0], 0) != std::string::npos)
is_bypasschar = 1;
}
if (!deaf_bypasschars_uline.empty())
{
is_bypasschar_uline_avail = 1;
- if (deaf_bypasschars_uline.find(text[0], 0) != string::npos)
+ if (deaf_bypasschars_uline.find(text[0], 0) != std::string::npos)
is_bypasschar_uline = 1;
}
diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h
index c4d2e71ef..5bc41b136 100644
--- a/src/modules/m_filter.h
+++ b/src/modules/m_filter.h
@@ -388,7 +388,7 @@ int FilterBase::OnPreCommand(const std::string &command, const char** parameters
void FilterBase::OnRehash(User* user, const std::string &parameter)
{
ConfigReader* MyConf = new ConfigReader(ServerInstance);
- vector<std::string>().swap(exemptfromfilter);
+ std::vector<std::string>().swap(exemptfromfilter);
for (int index = 0; index < MyConf->Enumerate("exemptfromfilter"); ++index)
{
std::string chan = MyConf->ReadValue("exemptfromfilter", "channel", index);
diff --git a/src/modules/m_http_client.cpp b/src/modules/m_http_client.cpp
index a2a6d9014..1ca762b12 100644
--- a/src/modules/m_http_client.cpp
+++ b/src/modules/m_http_client.cpp
@@ -54,13 +54,13 @@ class HTTPResolver : public Resolver
HTTPSocket *socket;
std::string orig;
public:
- HTTPResolver(HTTPSocket *s, InspIRCd *Instance, const string &hostname, bool &cached, Module* me) : Resolver(Instance, hostname, DNS_QUERY_FORWARD, cached, me), socket(s)
+ HTTPResolver(HTTPSocket *s, InspIRCd *Instance, const std::string &hostname, bool &cached, Module* me) : Resolver(Instance, hostname, DNS_QUERY_FORWARD, cached, me), socket(s)
{
ServerInstance->Log(DEBUG,">>>>>>>>>>>>>>>>>> HTTPResolver::HTTPResolver <<<<<<<<<<<<<<<");
orig = hostname;
}
- void OnLookupComplete(const string &result, unsigned int ttl, bool cached, int resultnum = 0)
+ void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0)
{
ServerInstance->Log(DEBUG,"************* HTTPResolver::OnLookupComplete ***************");
if (!resultnum)
@@ -69,14 +69,14 @@ class HTTPResolver : public Resolver
socket->OnClose();
}
- void OnError(ResolverError e, const string &errmsg)
+ void OnError(ResolverError e, const std::string &errmsg)
{
ServerInstance->Log(DEBUG,"!!!!!!!!!!!!!!!! HTTPResolver::OnError: %s", errmsg.c_str());
socket->OnClose();
}
};
-typedef vector<HTTPSocket*> HTTPList;
+typedef std::vector<HTTPSocket*> HTTPList;
class ModuleHTTPClient : public Module
{
@@ -256,7 +256,7 @@ bool HTTPSocket::ParseURL(const std::string &iurl)
return true;
}
-void HTTPSocket::Connect(const string &ip)
+void HTTPSocket::Connect(const std::string &ip)
{
this->response = new HTTPClientResponse((Module*)Mod, req.GetSource() , url.url, 0, "");
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index be12b6be1..60796fd3f 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -21,14 +21,14 @@ class ModuleOperjoin : public Module
std::string operChan;
std::vector<std::string> operChans;
- int tokenize(const string &str, std::vector<std::string> &tokens)
+ int tokenize(const std::string &str, std::vector<std::string> &tokens)
{
// skip delimiters at beginning.
- string::size_type lastPos = str.find_first_not_of(",", 0);
+ std::string::size_type lastPos = str.find_first_not_of(",", 0);
// find first "non-delimiter".
- string::size_type pos = str.find_first_of(",", lastPos);
+ std::string::size_type pos = str.find_first_of(",", lastPos);
- while (string::npos != pos || string::npos != lastPos)
+ while (std::string::npos != pos || std::string::npos != lastPos)
{
// found a token, add it to the vector.
tokens.push_back(str.substr(lastPos, pos - lastPos));
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp
index 7e96c86d7..cdd59c7b6 100644
--- a/src/modules/m_opermodes.cpp
+++ b/src/modules/m_opermodes.cpp
@@ -92,8 +92,8 @@ class ModuleModesOnOper : public Module
smodes = "+" + smodes;
std::string buf;
- stringstream ss(smodes);
- vector<string> tokens;
+ std::stringstream ss(smodes);
+ std::vector<std::string> tokens;
// split into modes and mode params
while (ss >> buf)
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index f3eff8d74..f668b9061 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -1661,7 +1661,7 @@ int TreeSocket::OnIncomingConnection(int newsock, char* ip)
found = (std::find(Utils->ValidIPs.begin(), Utils->ValidIPs.end(), ip) != Utils->ValidIPs.end());
if (!found)
{
- for (vector<std::string>::iterator i = Utils->ValidIPs.begin(); i != Utils->ValidIPs.end(); i++)
+ for (std::vector<std::string>::iterator i = Utils->ValidIPs.begin(); i != Utils->ValidIPs.end(); i++)
if (irc::sockets::MatchCIDR(ip, (*i).c_str()))
found = true;
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h
index 0dbf06ec9..a77c1d27d 100644
--- a/src/modules/m_spanningtree/utils.h
+++ b/src/modules/m_spanningtree/utils.h
@@ -26,9 +26,9 @@ class ModuleSpanningTree;
* tree, used for rapid linear lookups.
*/
#ifdef WINDOWS
-typedef nspace::hash_map<std::string, TreeServer*, nspace::hash_compare<string, less<string> > > server_hash;
+typedef nspace::hash_map<std::string, TreeServer*, nspace::hash_compare<std::string, less<string> > > server_hash;
#else
-typedef nspace::hash_map<std::string, TreeServer*, nspace::hash<string>, irc::StrHashComp> server_hash;
+typedef nspace::hash_map<std::string, TreeServer*, nspace::hash<std::string>, irc::StrHashComp> server_hash;
#endif
typedef std::map<TreeServer*,TreeServer*> TreeServerList;
diff --git a/src/server.cpp b/src/server.cpp
index a73abcac2..2a30f3a37 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -106,7 +106,7 @@ void InspIRCd::AddServerName(const std::string &servername)
if(**itr == servername)
return;
- string * ns = new string(servername);
+ std::string * ns = new std::string(servername);
servernames.push_back(ns);
}
@@ -117,7 +117,7 @@ const char* InspIRCd::FindServerNamePtr(const std::string &servername)
if(**itr == servername)
return (*itr)->c_str();
- servernames.push_back(new string(servername));
+ servernames.push_back(new std::string(servername));
itr = --servernames.end();
return (*itr)->c_str();
}