]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/users.h
Comments :)
[user/henk/code/inspircd.git] / include / users.h
index 0b5bc467f2e69acf0026ffa3ad22191365e08cfb..a39af7b509b27b6767d2b52641e2c281ada7fc3b 100644 (file)
@@ -38,15 +38,19 @@ enum ClassTypes {
 /** RFC1459 channel modes
  *  */
 enum UserModes {
-       UM_SERVERNOTICE = 's'-65,
-       UM_WALLOPS = 'w'-65,
-       UM_INVISIBLE = 'i'-65,
-       UM_OPERATOR = 'o'-65,
-       UM_SNOMASK = 'n'-65,
+       UM_SERVERNOTICE = 's' - 65,
+       UM_WALLOPS = 'w' - 65,
+       UM_INVISIBLE = 'i' - 65,
+       UM_OPERATOR = 'o' - 65,
+       UM_SNOMASK = 'n' - 65
 };
 
 enum RegistrationState {
+
+#ifndef WIN32   // Burlex: This is already defined in win32, luckily it is still 0.
        REG_NONE = 0,           /* Has sent nothing */
+#endif
+
        REG_USER = 1,           /* Has sent USER */
        REG_NICK = 2,           /* Has sent NICK */
        REG_NICKUSER = 3,       /* Bitwise combination of REG_NICK and REG_USER */
@@ -57,7 +61,7 @@ class InspIRCd;
 
 /** Derived from Resolver, and performs user forward/reverse lookups.
  */
-class UserResolver : public Resolver
+class CoreExport UserResolver : public Resolver
 {
  private:
        /** User this class is 'attached' to.
@@ -75,7 +79,7 @@ class UserResolver : public Resolver
 
 /** Holds information relevent to <connect allow> and <connect deny> tags in the config file.
  */
-class ConnectClass : public classbase
+class CoreExport ConnectClass : public classbase
 {
  private:
        /** Type of line, either CC_ALLOW or CC_DENY
@@ -247,6 +251,16 @@ typedef std::vector<ConnectClass> ClassVector;
 typedef std::map<chanrec*, char> UserChanList;
 typedef UserChanList::iterator UCListIter;
 
+class userrec;
+
+class CoreExport VisData
+{
+ public:
+       VisData();
+       virtual ~VisData();
+       virtual bool VisibleTo(userrec* user);
+};
+
 /** Holds all information about a user
  * This class stores all information about a user connected to the irc server. Everything about a
  * connection is stored here primarily, from the user's socket ID (file descriptor) through to the
@@ -254,7 +268,7 @@ typedef UserChanList::iterator UCListIter;
  * by nickname, or the FindDescriptor method of the InspIRCd class to find a specific user by their
  * file descriptor value.
  */
-class userrec : public connection
+class CoreExport userrec : public connection
 {
  private:
        /** Pointer to creator.
@@ -308,6 +322,8 @@ class userrec : public connection
         */
        UserResolver* res_reverse;
 
+       VisData* Visibility;
+
        /** Stored reverse lookup from res_forward
         */
        std::string stored_host;
@@ -696,6 +712,10 @@ class userrec : public connection
         */
        void Oper(const std::string &opertype);
 
+       /** Call this method to find the matching <connect> for a user, and to check them against it.
+        */
+       void CheckClass();
+
        /** Use this method to fully connect a user.
         * This will send the message of the day, check G/K/E lines, etc.
         */