X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=e76c886762662739ce6d11e8cdae45fceb229c0c;hb=52acbb466b84a1cd161b1c111f855d6f0419fff3;hp=80d9fb00cfdf046ccafba4f31deaa03c0770b92c;hpb=b1d06ea1d3a4a11a8253e0d81c832cb54c3c0946;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index 80d9fb00c..e76c88676 100644 --- a/include/users.h +++ b/include/users.h @@ -46,7 +46,11 @@ enum UserModes { }; 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 @@ -223,14 +227,14 @@ public: */ unsigned long GetMaxLocal() { - return (maxlocal ? maxlocal : 1); + return maxlocal; } /** Returns the maximum number of global sessions */ unsigned long GetMaxGlobal() { - return (maxglobal ? maxglobal : 1); + return maxglobal; } }; @@ -247,6 +251,16 @@ typedef std::vector ClassVector; typedef std::map 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 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. */