]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspircd.h
removed sys/select.h on windows platform
[user/henk/code/inspircd.git] / include / inspircd.h
index 12030677c221e16e69526eeff36073baaf80549e..fb6b313a2d4c4b866d22db57f95ac42dd7e585e4 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -32,6 +32,7 @@
 #include "inspircd_config.h"
 #include "uid.h"
 #include "users.h"
+#include "usermanager.h"
 #include "channels.h"
 #include "socket.h"
 #include "mode.h"
@@ -211,9 +212,6 @@ class serverstats : public classbase
 /** A list of failed port bindings, used for informational purposes on startup */
 typedef std::vector<std::pair<std::string, long> > FailedPortList;
 
-/** A list of ip addresses cross referenced against clone counts */
-typedef std::map<irc::string, unsigned int> clonemap;
-
 class InspIRCd;
 
 DEFINE_HANDLER1(ProcessUserHandler, void, User*);
@@ -433,14 +431,6 @@ class CoreExport InspIRCd : public classbase
         */
        std::list<User*> all_opers;
 
-       /** Map of local ip addresses for clone counting
-        */
-       clonemap local_clones;
-
-       /** Map of global ip addresses for clone counting
-        */
-       clonemap global_clones;
-
        /** DNS class, provides resolver facilities to the core and modules
         */
        DNS* Res;
@@ -453,6 +443,10 @@ class CoreExport InspIRCd : public classbase
         */
        XLineManager* XLines;
 
+       /** User manager. Various methods and data associated with users.
+        */
+       UserManager *Users;
+
        /** Set to the current signal recieved
         */
        int s_signal;
@@ -472,16 +466,6 @@ class CoreExport InspIRCd : public classbase
         * @return The old time delta
         */
        int SetTimeDelta(int delta);
-
-       /** Add a user to the local clone map
-        * @param user The user to add
-        */
-       void AddLocalClone(User* user);
-
-       /** Add a user to the global clone map
-        * @param user The user to add
-        */
-       void AddGlobalClone(User* user);
        
        /** Number of users with a certain mode set on them
         */
@@ -541,17 +525,6 @@ class CoreExport InspIRCd : public classbase
         */
        std::string GetServerDescription(const char* servername);
 
-       /** Write text to all opers connected to this server
-        * @param text The text format string
-        * @param ... Format args
-        */
-       void WriteOpers(const char* text, ...);
-
-       /** Write text to all opers connected to this server
-        * @param text The text to send
-        */
-       void WriteOpers(const std::string &text);
-
        /** Find a user in the nick hash.
         * If the user cant be found in the nick hash check the uuid hash
         * @param nick The nickname to find
@@ -635,6 +608,11 @@ class CoreExport InspIRCd : public classbase
         */
        bool IsChannel(const char *chname);
 
+       /** Return true if str looks like a server ID
+        * @param string to check against
+        */
+       bool IsSID(const std::string &str);
+
        /** Rehash the local server
         */
        void Rehash();
@@ -662,36 +640,11 @@ class CoreExport InspIRCd : public classbase
         */
        static void QuickExit(int status);
 
-       /** Return a count of users, unknown and known connections
-        * @return The number of users
-        */
-       int UserCount();
-
-       /** Return a count of fully registered connections only
-        * @return The number of registered users
-        */
-       int RegisteredUserCount();
-
-       /** Return a count of opered (umode +o) users only
-        * @return The number of opers
-        */
-       int OperCount();
-
-       /** Return a count of unregistered (before NICK/USER) users only
-        * @return The number of unregistered (unknown) connections
-        */
-       int UnregisteredUserCount();
-
        /** Return a count of channels on the network
         * @return The number of channels
         */
        long ChannelCount();
 
-       /** Return a count of local users on this server only
-        * @return The number of local users
-        */
-       long LocalUserCount();
-
        /** Send an error notice to all local users, opered and unopered
         * @param s The error string to send
         */
@@ -716,24 +669,6 @@ class CoreExport InspIRCd : public classbase
         */
        caller1<User*, int> FindDescriptor;
 
-       /** Add a new mode to this server's mode parser
-        * @param mh The modehandler to add
-        * @return True if the mode handler was added
-        */
-       bool AddMode(ModeHandler* mh);
-
-       /** Add a new mode watcher to this server's mode parser
-        * @param mw The modewatcher to add
-        * @return True if the modewatcher was added
-        */
-       bool AddModeWatcher(ModeWatcher* mw);
-
-       /** Delete a mode watcher from this server's mode parser
-        * @param mw The modewatcher to delete
-        * @return True if the modewatcher was deleted
-        */
-       bool DelModeWatcher(ModeWatcher* mw);
-
        /** Add a dns Resolver class to this server's active set
         * @param r The resolver to add
         * @param cached If this value is true, then the cache will
@@ -844,15 +779,16 @@ class CoreExport InspIRCd : public classbase
         */
        long Duration(const std::string &str);
 
-       /** Attempt to compare an oper password to a string from the config file.
+       /** Attempt to compare a password to a string from the config file.
         * This will be passed to handling modules which will compare the data
         * against possible hashed equivalents in the input string.
+        * @param ex The object (user, server, whatever) causing the comparison.
         * @param data The data from the config file
         * @param input The data input by the oper
-        * @param tagnum the tag number of the oper's tag in the config file
+        * @param hashtype The hash from the config file
         * @return 0 if the strings match, 1 or -1 if they do not
         */
-       int OperPassCompare(const char* data,const char* input, int tagnum);
+       int PassCompare(Extensible* ex, const char* data,const char* input, const char* hashtype);
 
        /** Check if a given server is a uline.
         * An empty string returns true, this is by design.