]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Clear up header insanity
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 3 Feb 2008 23:20:20 +0000 (23:20 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 3 Feb 2008 23:20:20 +0000 (23:20 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8808 e03df62e-2008-0410-955e-edbf42e46eb7

37 files changed:
include/bancache.h
include/base.h
include/channels.h
include/command_parse.h
include/ctables.h
include/dns.h
include/dynamic.h
include/filelogger.h
include/globals.h
include/hash_map.h
include/hashcomp.h
include/inspircd.h
include/inspsocket.h
include/inspstring.h
include/mode.h
include/snomasks.h
include/socket.h
include/timer.h
include/typedefs.h
include/u_listmode.h
include/users.h
include/wildcard.h
include/xline.h
src/configreader.cpp
src/hashcomp.cpp
src/modules.cpp
src/modules/m_alltime.cpp
src/modules/m_conn_join.cpp
src/modules/m_conn_umodes.cpp
src/modules/m_deaf.cpp
src/modules/m_filter.h
src/modules/m_http_client.cpp
src/modules/m_operjoin.cpp
src/modules/m_opermodes.cpp
src/modules/m_spanningtree/treesocket2.cpp
src/modules/m_spanningtree/utils.h
src/server.cpp

index b00bcbae562a06b888ff6026f14f2c6a2fcdafd8..3aee3cffdaa5096f3d0918860f0a689497955db9 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef __BANCACHE_H
 #define __BANCACHE_H
 
-#include <string>
-
 class CoreExport BanCacheHit : public classbase
 {
  private:
index c0513e64d24db227a3e48e38888bb6a01feb68f1..904a1005cb4c67061d6e133a1f851b89c4032641 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef __BASE_H__ 
 #define __BASE_H__ 
 
-#include "inspircd_config.h"
-#include <time.h>
 #include <map>
 #include <deque>
 #include <string>
index 92dd9a1a37120acd9d3eaed7c1b97e19799447df..3419e4c69c0ef8abb63a84c1853e3acac0f9e58c 100644 (file)
 #ifndef __CHANNELS_H__
 #define __CHANNELS_H__
 
-#include "inspircd_config.h"
-#include "base.h"
-#include <time.h>
-#include <vector>
-#include <string>
-#include <map>
-
 /** RFC1459 channel modes
  */
 enum ChannelModes {
@@ -36,7 +29,6 @@ enum ChannelModes {
 
 /* Forward declarations - needed */
 class User;
-class Channel;
 
 /** Holds an entry for a ban list, exemption list, or invite list.
  * This class contains a single element in a channel list, such as a banlist.
index c2fa781772237f5cc5a185dc447e98173dcaf631..13b70997be1db457ef7a1309fa7d707a1cc692a4 100644 (file)
 #ifndef __COMMAND_PARSE_H
 #define __COMMAND_PARSE_H
 
-#include <string>
-#include "ctables.h"
-
-/** Required forward declaration
- */
-class InspIRCd;
-
 /** A list of dll/so files containing the command handlers for the core
  */
 typedef std::map<std::string, void*> SharedObjectList;
index 0bd767df0b3096b0a2f41097e50ef7256a7b8445..8daddf1922351edf2a4c513d785d37ede36ec9ef 100644 (file)
 #ifndef __CTABLES_H__
 #define __CTABLES_H__
 
-
-#include "inspircd_config.h"
-#include "hash_map.h"
-#include "base.h"
-
-/* Forward declarations - required */
-class User;
-class InspIRCd;
-
 /** Used to indicate command success codes
  */
 enum CmdResult
index 6972a1fb29992e34075b9431391ec982c78daf98..09ba10d256ef4d49b14c1a34374fad8b8977bb77 100644 (file)
@@ -32,21 +32,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #ifndef _DNS_H
 #define _DNS_H
 
-#include <string>
-#include "inspircd_config.h"
-#include "base.h"
-#include "socketengine.h"
 #include "socket.h"
-#include "hash_map.h"
 #include "hashcomp.h"
 
-using namespace std;
-using irc::sockets::insp_aton;
-using irc::sockets::insp_ntoa;
-using irc::sockets::insp_sockaddr;
-using irc::sockets::insp_inaddr;
-
-class InspIRCd;
 class Module;
 
 /**
@@ -419,7 +407,7 @@ class CoreExport DNS : public EventHandler
         * e.g. use ipv6 reverse lookup when built for ipv6,
         * or ipv4 lookup when built for ipv4.
         */
-       int GetName(const insp_inaddr* ip);
+       int GetName(const irc::sockets::insp_inaddr* ip);
 
        /**
         * Start lookup of a hostname from an ip, but
index 63229febbcc58d9ac184e6faff50520cf27109c5..4cf299c1f33c554e9f2759cfda8da06f96d8602b 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef __DLL_H
 #define __DLL_H
 
-#include "inspircd_config.h"
-
 /** The DLLManager class is able to load a module file by filename,
  * and locate its init_module symbol.
  */
index 36e50b11c3c716371e502fcff31a3917d3885893..1aeeb7750c64cf90d3e4e5f61998733a2b7559fe 100644 (file)
 #ifndef __LOG_H__
 #define __LOG_H__
 
-#include <time.h>
-#include <string>
-#include <sstream>
-#include "socketengine.h"
-
-
 /** Debug levels for use with InspIRCd::Log()
  *  */
 enum DebugLevel
index 463f85300c3498007d0924ea5ac842360abe27c6..01a8b48e0b8f6dc5d2cd0a035375e7b2a812843a 100644 (file)
 #ifndef __WORLD_H
 #define __WORLD_H
 
-#include <string>
-#include <deque>
-#include <map>
-#include <vector>
-
 /** A cached text file stored with its contents as lines
  */
 typedef std::deque<std::string> file_cache;
index 3c3703ce4519f475bf9ee6a9bcb7234805c28359..b922f61733893612ec8880cea8dfac1761ebbf67 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef INSPIRCD_HASHMAP_H
 #define INSPIRCD_HASHMAP_H
 
-#include "inspircd_config.h"
-
 /** Where hash_map is varies from compiler to compiler
  * as it is not standard.
  */
index dc07c190e8b62e063283d253c8dfa18e88b00443..eafc74abfda7b9fafad35cbe4401f6492fe552a8 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef _HASHCOMP_H_
 #define _HASHCOMP_H_
 
-#include "inspircd_config.h"
-#include "socket.h"
+//#include "inspircd_config.h"
+//#include "socket.h"
 #include "hash_map.h"
 
 /*******************************************************
  * aware of irc::string.
  *******************************************************/
 
-/** Required namespaces and symbols */
-using namespace std;
-
-/** aton() */
-using irc::sockets::insp_aton;
-
-/** nota() */
-using irc::sockets::insp_ntoa;
-
 #ifndef LOWERMAP
 #define LOWERMAP
 /** A mapping of uppercase to lowercase, including scandinavian
@@ -133,7 +124,7 @@ namespace irc
 
        /** This typedef declares irc::string based upon irc_char_traits.
         */
-       typedef basic_string<char, irc_char_traits, allocator<char> > string;
+       typedef std::basic_string<char, irc_char_traits, std::allocator<char> > string;
 
        /** irc::stringjoiner joins string lists into a string, using
         * the given seperator string.
@@ -711,7 +702,7 @@ namespace nspace
                * @param s A string to hash
                * @return The hash value
                */
-               size_t operator()(const string &s) const;
+               size_t operator()(const std::string &s) const;
        };
 #endif
 
index d78e25b48d287f9c9d6ba7b8e3bbda42f7293dea..71a809be9e12b9f5fc49f0ec4c2b13aa1fd0974e 100644 (file)
 #include "uid.h"
 #include "users.h"
 #include "channels.h"
+#include "timer.h"
 #include "hashcomp.h"
 #include "typedefs.h"
 #include "usermanager.h"
 #include "socket.h"
+#include "ctables.h"
+#include "command_parse.h"
 #include "mode.h"
 #include "socketengine.h"
-#include "command_parse.h"
 #include "snomasks.h"
 #include "cull_list.h"
 #include "filelogger.h"
 #include "caller.h"
+//#include "inspsocket.h"
+#include "modules.h"
+#include "configreader.h"
+#include "inspstring.h"
 
 /**
  * Used to define the maximum number of parameters a command may have.
@@ -295,7 +301,7 @@ class CoreExport InspIRCd : public classbase
 
        /** Used when connecting clients
         */
-       insp_sockaddr client, server;
+       irc::sockets::insp_sockaddr client, server;
 
        /** Used when connecting clients
         */
@@ -706,7 +712,7 @@ class CoreExport InspIRCd : public classbase
         * @param LinePrefix text to prefix each complete line with
         * @param TextStream the text to send to the user
         */
-       void DumpText(User* User, const std::string &LinePrefix, stringstream &TextStream);
+       void DumpText(User* User, const std::string &LinePrefix, std::stringstream &TextStream);
 
        /** Check if the given nickmask matches too many users, send errors to the given user
         * @param nick A nickmask to match against
index fd5d4dd18c47f1ff1fbe97b44713950896db1726..77c283f7fcb9109f9fe9333089593a62aadbf521 100644 (file)
 #ifndef __INSP_SOCKET_H__
 #define __INSP_SOCKET_H__
 
-#include <sstream>
-#include <string>
-#include <deque>
-#include "dns.h"
-#include "inspircd_config.h"
-#include "socket.h"
-#include "inspsocket.h"
 #include "timer.h"
 
 /**
index 714e066066714b09430bc0d182b057b6682e6e51..bb03bc2edbe5f2480c2df745321a06629c5b881f 100644 (file)
 #ifndef __IN_INSPSTRING_H
 #define __IN_INSPSTRING_H
 
+// This (inspircd_config) is needed as inspstring doesn't pull in the central header
 #include "inspircd_config.h"
 #include <string.h>
-#include <cstddef>
+//#include <cstddef>
 
 #ifndef HAS_STRLCPY
 /** strlcpy() implementation for systems that don't have it (linux) */
index eda18a528e6786beb2182f78fbde7d894f9db750..71607117665e10eef1b977c1caf31d96f5ae4ae1 100644 (file)
 #ifndef __MODE_H
 #define __MODE_H
 
-#include <string>
-#include <deque>
-#include <vector>
-#include "ctables.h"
-
-class InspIRCd;
-
 /**
  * Holds the values for different type of modes
  * that can exist, USER or CHANNEL type.
index 334bbf0dc447fed600b02ef46c06aa87429044bb..e3318f23a8f34686267080c7f6f17e2fae1dc2c0 100644 (file)
 #ifndef __SNOMASKS_H__
 #define __SNOMASKS_H__
 
-#include <string>
-#include <vector>
-#include <map>
-#include "configreader.h"
-#include "inspircd.h"
-
 class Snomask
 {
  private:
index 635b3ce5503cc4ae37c0f84740e2db53217cbbdc..53bad88f045f3d5dea3eed6a2d5db035f509d02d 100644 (file)
@@ -34,7 +34,6 @@
 #endif
 
 #include <errno.h>
-#include "inspircd_config.h"
 #include "socketengine.h"
 
 /* Contains irc-specific definitions */
index abe15a2b7c802474838a892223fb5b1ee82992b5..2c38ad88ed1514e1ae82d690e6ec8f7b5d6c64fc 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef INSPIRCD_TIMER_H
 #define INSPIRCD_TIMER_H
 
-class InspIRCd;
+//class InspIRCd;
 
 /** Timer class for one-second resolution timers
  * Timer provides a facility which allows module
index 2a98da4aec4ccb6de27003cc8b57a903aa195dd6..6395bfe39ba2bd39b8c7181649f84acf0830ccf2 100644 (file)
 #ifndef WIN32
 /** User hash (POSIX systems with GCC)
  */
-typedef nspace::hash_map<std::string, User*, nspace::hash<string>, irc::StrHashComp> user_hash;
+typedef nspace::hash_map<std::string, User*, nspace::hash<std::string>, irc::StrHashComp> user_hash;
 /** Channel hash (POSIX systems with GCC)
  */
-typedef nspace::hash_map<std::string, Channel*, nspace::hash<string>, irc::StrHashComp> chan_hash;
+typedef nspace::hash_map<std::string, Channel*, nspace::hash<std::string>, irc::StrHashComp> chan_hash;
 #else
 /** User hash (windows systems with visual studio)
  */
-typedef nspace::hash_map<std::string, User*, nspace::hash_compare<string, less<string> > > user_hash;
+typedef nspace::hash_map<std::string, User*, nspace::hash_compare<std::string, less<std::string> > > user_hash;
 /** Channel hash (windows systems with visual studio)
  */
-typedef nspace::hash_map<std::string, Channel*, nspace::hash_compare<string, less<string> > > chan_hash;
+typedef nspace::hash_map<std::string, Channel*, nspace::hash_compare<std::string, less<std::string> > > chan_hash;
 #endif
 
 /** Server name cache
index aa387ccf15e77359eb15d50db198d52c7f163c76..b9a11af82f5f88b0b4b189001368825a9bfe6367 100644 (file)
 #ifndef INSPIRCD_LISTMODE_PROVIDER
 #define INSPIRCD_LISTMODE_PROVIDER
 
-#include <stdio.h>
-#include <string>
-#include <sstream>
-#include <vector>
-#include "inspircd.h"
-#include "modules.h"
 #include "wildcard.h"
 
 /** Get the time as a string
index b9b23eaef5dd1e256909a7d343f17fd4ac354376..1fca831ef632013759b1843d3a4b05c7746546d9 100644 (file)
 #ifndef __USERS_H__
 #define __USERS_H__
 
-#include <string>
-#include "inspircd_config.h"
 #include "socket.h"
-#include "channels.h"
-#include "inspstring.h"
 #include "connection.h"
-#include "hashcomp.h"
 #include "dns.h"
 
 /** Channel status for a user
@@ -76,47 +71,8 @@ enum RegistrationState {
 };
 
 /* Required forward declaration */
-class InspIRCd;
-
-/** Derived from Resolver, and performs user forward/reverse lookups.
- */
-class CoreExport UserResolver : public Resolver
-{
- private:
-       /** User this class is 'attached' to.
-        */
-       User* bound_user;
-       /** File descriptor teh lookup is bound to
-        */
-       int bound_fd;
-       /** True if the lookup is forward, false if is a reverse lookup
-        */
-       bool fwd;
- public:
-       /** Create a resolver.
-        * @param Instance The creating instance
-        * @param user The user to begin lookup on
-        * @param to_resolve The IP or host to resolve
-        * @param qt The query type
-        * @param cache Modified by the constructor if the result was cached
-        */
-       UserResolver(InspIRCd* Instance, User* user, std::string to_resolve, QueryType qt, bool &cache);
-
-       /** Called on successful lookup
-        * @param result Result string
-        * @param ttl Time to live for result
-        * @param cached True if the result was found in the cache
-        * @param resultnum Result number, we are only interested in result 0
-        */
-       void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0);
-
-       /** Called on failed lookup
-        * @param e Error code
-        * @param errormessage Error message string
-        */
-       void OnError(ResolverError e, const std::string &errormessage);
-};
-
+class Channel;
+class UserResolver;
 
 /** Holds information relevent to &lt;connect allow&gt; and &lt;connect deny&gt; tags in the config file.
  */
@@ -1146,8 +1102,47 @@ class CoreExport User : public connection
        virtual ~User();
 };
 
+/** Derived from Resolver, and performs user forward/reverse lookups.
+ */
+class CoreExport UserResolver : public Resolver
+{
+ private:
+       /** User this class is 'attached' to.
+        */
+       User* bound_user;
+       /** File descriptor teh lookup is bound to
+        */
+       int bound_fd;
+       /** True if the lookup is forward, false if is a reverse lookup
+        */
+       bool fwd;
+ public:
+       /** Create a resolver.
+        * @param Instance The creating instance
+        * @param user The user to begin lookup on
+        * @param to_resolve The IP or host to resolve
+        * @param qt The query type
+        * @param cache Modified by the constructor if the result was cached
+        */
+       UserResolver(InspIRCd* Instance, User* user, std::string to_resolve, QueryType qt, bool &cache);
+
+       /** Called on successful lookup
+        * @param result Result string
+        * @param ttl Time to live for result
+        * @param cached True if the result was found in the cache
+        * @param resultnum Result number, we are only interested in result 0
+        */
+       void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0);
+
+       /** Called on failed lookup
+        * @param e Error code
+        * @param errormessage Error message string
+        */
+       void OnError(ResolverError e, const std::string &errormessage);
+};
+
 /* Configuration callbacks */
-class ServerConfig;
+//class ServerConfig;
 
 #endif
 
index dc2790b54428cf65c5bdbee3743a38c7a5b2e965..0d5e3e0aa119d09c5979251f514b43294d2b6b5e 100644 (file)
@@ -11,8 +11,6 @@
  * ---------------------------------------------------
  */
 
-#include "inspircd_config.h"
-
 /** Match a string against a mask.
  * @param str The string to check
  * @param mask the mask to check against
index 348507f37759dd4c030dc0e1bf7a3147fba8c6cd..d5653f8e0558b16b9913fdadc369198439389e5c 100644 (file)
@@ -14,9 +14,9 @@
 #ifndef __XLINE_H
 #define __XLINE_H
 
-#include <string>
-#include <deque>
-#include <vector>
+//#include <string>
+//#include <deque>
+//#include <vector>
 
 /** XLine is the base class for ban lines such as G lines and K lines.
  * Modules may derive from this, and their xlines will automatically be
index 945780a54f4600aeee3d11a7c81ee367383cec08..f083f7895c2cdd8380fc467709a5ca3478d2beb2 100644 (file)
@@ -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())
index 15be92bd7105cbd631824ea8076da9bbd50f59da..f73a6f1c1893e7ebc215e6127ad8f71995d6e6bc 100644 (file)
@@ -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! :)
index 6cc1a3450c7c53f8da49e197a2c5a35d748fd884..0142749cfe7a23806d68d093fc5006d5c3baaef6 100644 (file)
@@ -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;
index aa244b45d2e2e0ebca5240cb94bc754533fab8a1..602646ebdc28ce9361e1cfbbea4957e4138b0364 100644 (file)
@@ -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");
index bdd8f43ea13c68415c16298b169fa1ee9135b34d..b3be3932b76a78757e1b8fecd6ba18581f599528 100644 (file)
@@ -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));
index 6ba965d6161c6300bbccdd8ea683b068bd6a4932..bfae76f1b35899570b0b5c3df5b869735b1264e2 100644 (file)
@@ -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)
index 5d648cff99397cb7a93c3aad69aba6fb96f35f10..ed110d6c96461a3c0f150057625ca1a6f1755e35 100644 (file)
@@ -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;
                }
 
index c4d2e71ef57aa1a877126d0be2c4317c8f4640c3..5bc41b136ab367665b3b8b5661182b297e021552 100644 (file)
@@ -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);
index a2a6d9014db8fe4199df4a4a79be3b942796c2da..1ca762b12e9ba51098b59abbb1ba931b19f3719d 100644 (file)
@@ -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, "");
 
index be12b6be19815ea729da2b82ee12c658a1b908a7..60796fd3f4a2b864c4c8ce324f3d700f4cc5bf9f 100644 (file)
@@ -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));
index 7e96c86d7c44e0970141746353f3986a01cc5918..cdd59c7b6da689b9a86fe18a0babcf80734035dc 100644 (file)
@@ -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)
index f3eff8d74d3d460ea868e7a7a0900edfb97e29ef..f668b906185e2fc295448f44e1d14bf09040073d 100644 (file)
@@ -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;
 
index 0dbf06ec9d2d6c31221286590538c2d2ab991afc..a77c1d27db3253e6b14eb05c3fda2a082af57189 100644 (file)
@@ -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;
index a73abcac271e2b06c05c78798bf04b1e7e8827d2..2a30f3a37ba766744d41f955d20285cefa1f9a91 100644 (file)
@@ -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();
 }