X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fcull_list.h;h=e20e4556a24a0032571168b6fd6552398a7be6ff;hb=33530c338c1daaed0a48f8e3c9ccb21ec9ced49c;hp=ca7189f4ce9b0603026cc27098e6c57efa48fbb4;hpb=0cf08426b2ff53d6fc1ca8125a57c79d87070b7b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/cull_list.h b/include/cull_list.h index ca7189f4c..e20e4556a 100644 --- a/include/cull_list.h +++ b/include/cull_list.h @@ -19,21 +19,20 @@ // include the common header files -#include -#include #include #include -#include #include #include "users.h" #include "channels.h" +class InspIRCd; + /** The CullItem class holds a user and their quitmessage, * and is used internally by the CullList class to compile * a list of users which are to be culled when a long * operation (such as a netsplit) has completed. */ -class CullItem +class CullItem : public classbase { private: /** Holds a pointer to the user, @@ -42,7 +41,7 @@ class CullItem userrec* user; /** Holds the quit reason to use for this user. */ - std::string reason; + std::string reason; public: /** Constrcutor. * Initializes the CullItem with a user pointer @@ -52,12 +51,15 @@ class CullItem */ CullItem(userrec* u, std::string &r); CullItem(userrec* u, const char* r); + + ~CullItem(); + /** Returns a pointer to the user */ userrec* GetUser(); /** Returns the user's quit reason */ - std::string GetReason(); + std::string& GetReason(); }; /** The CullList class can be used by modules, and is used @@ -73,9 +75,12 @@ class CullItem * you attempt to add the same user twice, then the second * attempt will be ignored. */ -class CullList +class CullList : public classbase { private: + /** Creator of this CullList + */ + InspIRCd* ServerInstance; /** Holds a list of users being quit. * See the information for CullItem for * more information. @@ -98,8 +103,9 @@ class CullList /** Constructor. * Clears the CullList::list and CullList::exempt * items. + * @param Instance Creator of this CullList object */ - CullList(); + CullList(InspIRCd* Instance); /** Adds a user to the cull list for later * removal via QUIT. * @param user The user to add