diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 18:55:52 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 18:55:52 +0000 |
commit | 9bc04a302572eb311a147a32ff1d36f1d91f2d7a (patch) | |
tree | 847f867baeefde36c133387b578aa937c37b4360 /include/users.h | |
parent | 2591562ada4cb1f866e5d1c98340fb19332b3844 (diff) |
userrec and chanrec now have their own independent pointer back to their 'creator' InspIRCd* object, extern now longer required in channels.cpp or users.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4820 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/users.h b/include/users.h index 6e5a60b23..8e3fddfcd 100644 --- a/include/users.h +++ b/include/users.h @@ -66,6 +66,8 @@ class Invited : public classbase +class InspIRCd; + /** Derived from Resolver, and performs user forward/reverse lookups. */ class UserResolver : public Resolver @@ -76,8 +78,9 @@ class UserResolver : public Resolver userrec* bound_user; int bound_fd; bool fwd; + InspIRCd* ServerInstance; public: - UserResolver(userrec* user, std::string to_resolve, bool forward); + UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, bool forward); void OnLookupComplete(const std::string &result); void OnError(ResolverError e, const std::string &errormessage); @@ -156,6 +159,9 @@ typedef std::vector<ucrec*> UserChanList; class userrec : public connection { private: + /** Pointer to creator + */ + InspIRCd* ServerInstance; /** A list of channels the user has a pending invite to. */ @@ -324,7 +330,7 @@ class userrec : public connection /** Default constructor * @throw Nothing at present */ - userrec(); + userrec(InspIRCd* Instance); /** Returns the full displayed host of the user * This member function returns the hostname of the user as seen by other users @@ -500,7 +506,7 @@ class userrec : public connection * @param user The user to remove * @param r The quit reason */ - static void QuitUser(userrec *user, const std::string &r); + static void QuitUser(InspIRCd* Instance, userrec *user, const std::string &r); /** Add the user to WHOWAS system */ @@ -542,7 +548,7 @@ class userrec : public connection * This will create a new userrec, insert it into the user_hash, * initialize it as not yet registered, and add it to the socket engine. */ - static void AddClient(int socket, int port, bool iscached, insp_inaddr ip); + static void AddClient(InspIRCd* Instance, int socket, int port, bool iscached, insp_inaddr ip); /** Oper down. * This will clear the +o usermode and unset the user's oper type |