summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/channels.h10
-rw-r--r--include/connection.h2
-rw-r--r--include/globals.h17
-rw-r--r--include/inspircd.h20
-rw-r--r--include/modules.h52
-rw-r--r--include/servers.h4
-rw-r--r--include/users.h4
7 files changed, 56 insertions, 53 deletions
diff --git a/include/channels.h b/include/channels.h
index a800c73a9..b60ee6cad 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -53,15 +53,15 @@ class InviteItem : public HostItem
/** Holds a complete ban list
*/
-typedef vector<BanItem> BanList;
+typedef std::vector<BanItem> BanList;
/** Holds a complete exempt list
*/
-typedef vector<ExemptItem> ExemptList;
+typedef std::vector<ExemptItem> ExemptList;
/** Holds a complete invite list
*/
-typedef vector<InviteItem> InviteList;
+typedef std::vector<InviteItem> InviteList;
/** Holds all relevent information for a channel.
* This class represents a channel, and contains its name, modes, time created, topic, topic set time,
@@ -135,11 +135,11 @@ class chanrec : public classbase
/** Sets or unsets a custom mode in the channels info
*/
- SetCustomMode(char mode,bool mode_on);
+ void SetCustomMode(char mode,bool mode_on);
/** Sets or unsets the parameterrs for a custom mode in a channels info
*/
- SetCustomModeParam(char mode,char* parameter,bool mode_on);
+ void SetCustomModeParam(char mode,char* parameter,bool mode_on);
/** Creates a channel record and initialises it with default values
*/
diff --git a/include/connection.h b/include/connection.h
index 763b17fb5..a8f7372d9 100644
--- a/include/connection.h
+++ b/include/connection.h
@@ -5,7 +5,7 @@
#include "inspircd_config.h"
#include "base.h"
#include <string>
-#include <map.h>
+#include <map>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
diff --git a/include/globals.h b/include/globals.h
index 07c32303f..4f5e035e2 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -10,13 +10,13 @@
// include the common header files
#include <typeinfo>
-#include <iostream.h>
+#include <iostream>
#include <string>
#include <deque>
#include "users.h"
#include "channels.h"
-typedef deque<string> file_cache;
+typedef std::deque<std::string> file_cache;
void WriteOpers(char* text, ...);
void log(int level, char *text, ...);
@@ -31,14 +31,15 @@ void WriteCommon(userrec *u, char* text, ...);
void WriteCommonExcept(userrec *u, char* text, ...);
void WriteWallOps(userrec *source, char* text, ...);
int isnick(const char *n);
-userrec* Find(string nick);
+userrec* Find(std::string nick);
chanrec* FindChan(const char* chan);
char* cmode(userrec *user, chanrec *chan);
-string getservername();
-string getnetworkname();
-string getadminname();
-string getadminemail();
-string getadminnick();
+std::string getservername();
+std::string getnetworkname();
+std::string getadminname();
+std::string getadminemail();
+std::string getadminnick();
void readfile(file_cache &F, const char* fname);
+int ModeDefiend(char c, int i);
#endif
diff --git a/include/inspircd.h b/include/inspircd.h
index 03a5e168e..e1d75f712 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -46,7 +46,7 @@
#define SPARSE 40
#define NONE 50
-typedef deque<string> file_cache;
+typedef std::deque<std::string> file_cache;
/* prototypes */
int InspIRCd(void);
@@ -69,14 +69,16 @@ void WriteCommon(userrec *u, char* text, ...);
void WriteCommonExcept(userrec *u, char* text, ...);
void WriteWallOps(userrec *source, char* text, ...);
int isnick(const char *n);
-userrec* Find(string nick);
+userrec* Find(std::string nick);
chanrec* FindChan(const char* chan);
char* cmode(userrec *user, chanrec *chan);
-string getservername();
-string getserverdesc();
-string getnetworkname();
-string getadminname();
-string getadminemail();
-string getadminnick();
+std::string getservername();
+std::string getserverdesc();
+std::string getnetworkname();
+std::string getadminname();
+std::string getadminemail();
+std::string getadminnick();
void readfile(file_cache &F, const char* fname);
-
+bool ModeDefined(char c, int i);
+bool ModeDefinedOn(char c, int i);
+bool ModeDefinedOff(char c, int i);
diff --git a/include/modules.h b/include/modules.h
index 9a1c4cfef..a32319865 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -25,7 +25,7 @@
/** Low level definition of a FileReader classes file cache area
*/
-typedef deque<string> file_cache;
+typedef std::deque<std::string> file_cache;
typedef file_cache string_list;
// This #define allows us to call a method in all
@@ -56,8 +56,8 @@ class Version : public classbase
class Admin : public classbase
{
public:
- const string Name, Email, Nick;
- Admin(string name,string email,string nick);
+ const std::string Name, Email, Nick;
+ Admin(std::string name, std::string email, std::string nick);
};
/** Base class for all InspIRCd modules
@@ -137,7 +137,7 @@ class Module : public classbase
* the string parameter "raw". If you do this, after your function exits it will immediately be
* cut down to 510 characters plus a carriage return and linefeed.
*/
- virtual void OnServerRaw(string &raw, bool inbound);
+ virtual void OnServerRaw(std::string &raw, bool inbound);
/** Called whenever an extended mode is to be processed.
* The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being
@@ -172,39 +172,39 @@ class Server : public classbase
/** Sends text to all opers.
* This method sends a server notice to all opers with the usermode +s.
*/
- virtual void SendOpers(string s);
+ virtual void SendOpers(std::string s);
/** Writes a log string.
* This method writes a line of text to the log. If the level given is lower than the
* level given in the configuration, this command has no effect.
*/
- virtual void Log(int level, string s);
+ virtual void Log(int level, std::string s);
/** Sends a line of text down a TCP/IP socket.
* This method writes a line of text to an established socket, cutting it to 510 characters
* plus a carriage return and linefeed if required.
*/
- virtual void Send(int Socket, string s);
+ virtual void Send(int Socket, std::string s);
/** Sends text from the server to a socket.
* This method writes a line of text to an established socket, with the servername prepended
* as used by numerics (see RFC 1459)
*/
- virtual void SendServ(int Socket, string s);
+ virtual void SendServ(int Socket, std::string s);
/** Sends text from a user to a socket.
* This method writes a line of text to an established socket, with the given user's nick/ident
* /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)
*/
- virtual void SendFrom(int Socket, userrec* User, string s);
+ virtual void SendFrom(int Socket, userrec* User, std::string s);
/** Sends text from a user to another user.
* This method writes a line of text to a user, with a user's nick/ident
* /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459)
*/
- virtual void SendTo(userrec* Source, userrec* Dest, string s);
+ virtual void SendTo(userrec* Source, userrec* Dest, std::string s);
/** Sends text from a user to a channel (mulicast).
* This method writes a line of text to a channel, with the given user's nick/ident
* /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the
* IncludeSender flag is set, then the text is also sent back to the user from which
* it originated, as seen in MODE (see RFC 1459).
*/
- virtual void SendChannel(userrec* User, chanrec* Channel, string s,bool IncludeSender);
+ virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender);
/** Returns true if two users share a common channel.
* This method is used internally by the NICK and QUIT commands, and the Server::SendCommon
* method.
@@ -217,36 +217,36 @@ class Server : public classbase
* back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it
* is only sent to the other recipients, as seen in QUIT.
*/
- virtual void SendCommon(userrec* User, string text,bool IncludeSender);
+ virtual void SendCommon(userrec* User, std::string text,bool IncludeSender);
/** Sends a WALLOPS message.
* This method writes a WALLOPS message to all users with the +w flag, originating from the
* specified user.
*/
- virtual void SendWallops(userrec* User, string text);
+ virtual void SendWallops(userrec* User, std::string text);
/** Returns true if a nick is valid.
* Nicks for unregistered connections will return false.
*/
- virtual bool IsNick(string nick);
+ virtual bool IsNick(std::string nick);
/** Attempts to look up a nick and return a pointer to it.
* This function will return NULL if the nick does not exist.
*/
- virtual userrec* FindNick(string nick);
+ virtual userrec* FindNick(std::string nick);
/** Attempts to look up a channel and return a pointer to it.
* This function will return NULL if the channel does not exist.
*/
- virtual chanrec* FindChannel(string channel);
+ virtual chanrec* FindChannel(std::string channel);
/** Attempts to look up a user's privilages on a channel.
* This function will return a string containing either @, %, +, or an empty string,
* representing the user's privilages upon the channel you specify.
*/
- virtual string ChanMode(userrec* User, chanrec* Chan);
+ virtual std::string ChanMode(userrec* User, chanrec* Chan);
/** Returns the server name of the server where the module is loaded.
*/
- virtual string GetServerName();
+ virtual std::string GetServerName();
/** Returns the network name, global to all linked servers.
*/
- virtual string GetNetworkName();
+ virtual std::string GetNetworkName();
/** Returns the information of the server as returned by the /ADMIN command.
* See the Admin class for further information of the return value. The members
* Admin::Nick, Admin::Email and Admin::Name contain the information for the
@@ -285,7 +285,7 @@ class ConfigReader : public classbase
protected:
/** The filename of the configuration file, as set by the constructor.
*/
- string fname;
+ std::string fname;
public:
/** Default constructor.
* This constructor initialises the ConfigReader class to read the inspircd.conf file
@@ -295,7 +295,7 @@ class ConfigReader : public classbase
/** Overloaded constructor.
* This constructor initialises the ConfigReader class to read a user-specified config file
*/
- ConfigReader(string filename); // read a module-specific config
+ ConfigReader(std::string filename); // read a module-specific config
/** Default destructor.
* This method destroys the ConfigReader class.
*/
@@ -304,14 +304,14 @@ class ConfigReader : public classbase
* This method retrieves a value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve.
*/
- string ReadValue(string tag, string name, int index);
+ std::string ReadValue(std::string tag, std::string name, int index);
/** Counts the number of times a given tag appears in the config file.
* This method counts the number of times a tag appears in a config file, for use where
* there are several tags of the same kind, e.g. with opers and connect types. It can be
* used with the index value of ConfigReader::ReadValue to loop through all copies of a
* multiple instance tag.
*/
- int Enumerate(string tag);
+ int Enumerate(std::string tag);
/** Returns true if a config file is valid.
* This method is unimplemented and will always return true.
*/
@@ -339,7 +339,7 @@ class FileReader : public classbase
* and other methods to be called. If the file could not be loaded, FileReader::FileSize
* returns 0.
*/
- FileReader(string filename);
+ FileReader(std::string filename);
/** Default destructor.
* This deletes the memory allocated to the file.
*/
@@ -349,12 +349,12 @@ class FileReader : public classbase
* and other methods to be called. If the file could not be loaded, FileReader::FileSize
* returns 0.
*/
- void LoadFile(string filename);
+ void LoadFile(std::string filename);
/** Retrieve one line from the file.
* This method retrieves one line from the text file. If an empty non-NULL string is returned,
* the index was out of bounds, or the line had no data on it.
*/
- string GetLine(int x);
+ std::string GetLine(int x);
/** Returns the size of the file in lines.
* This method returns the number of lines in the read file. If it is 0, no lines have been
* read into memory, either because the file is empty or it does not exist, or cannot be
diff --git a/include/servers.h b/include/servers.h
index 9ce3e744d..6e10b62cc 100644
--- a/include/servers.h
+++ b/include/servers.h
@@ -6,7 +6,7 @@
#include "inspircd_config.h"
#include "connection.h"
#include <string>
-#include <map.h>
+#include <map>
#ifndef __SERVERS_H__
#define __SERVERS_H__
@@ -58,7 +58,7 @@ class serverrec : public connection
-typedef map<string, serverrec*> server_list;
+typedef std::map<std::string, serverrec*> server_list;
#endif
diff --git a/include/users.h b/include/users.h
index 1845b94c7..728a82d00 100644
--- a/include/users.h
+++ b/include/users.h
@@ -41,13 +41,13 @@ class ConnectClass : public classbase
/** Holds a complete list of all channels to which a user has been invited and has not yet joined.
*/
-typedef vector<Invited> InvitedList;
+typedef std::vector<Invited> InvitedList;
/** Holds a complete list of all allow and deny tags from the configuration file (connection classes)
*/
-typedef vector<ConnectClass> ClassVector;
+typedef std::vector<ConnectClass> ClassVector;
/** Holds all information about a user
* This class stores all information about a user connected to the irc server. Everything about a