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/channels.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/channels.h')
-rw-r--r-- | include/channels.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/channels.h b/include/channels.h index aa34ceb3c..32f28c751 100644 --- a/include/channels.h +++ b/include/channels.h @@ -142,6 +142,8 @@ class ucrec : public classbase virtual ~ucrec() { /* stub */ } }; +class InspIRCd; + /** Holds all relevent information for a channel. * This class represents a channel, and contains its name, modes, time created, topic, topic set time, @@ -151,9 +153,13 @@ class chanrec : public Extensible { private: + /** Pointer to creator object + */ + InspIRCd* ServerInstance; + /** Connect a chanrec to a userrec */ - static chanrec* ForceChan(chanrec* Ptr,ucrec *a,userrec* user, int created); + static chanrec* ForceChan(InspIRCd* Instance, chanrec* Ptr,ucrec *a,userrec* user, int created); public: /** The channels name. @@ -341,7 +347,7 @@ class chanrec : public Extensible /** Creates a channel record and initialises it with default values * @throw Nothing at present. */ - chanrec(); + chanrec(InspIRCd* Instance); /** Make src kick user from this channel with the given reason. * @param src The source of the kick @@ -379,7 +385,7 @@ class chanrec : public Extensible * been created if the channel did not exist before the user was joined to it. * If the user could not be joined to a channel, the return value may be NULL. */ - static chanrec* JoinUser(userrec *user, const char* cn, bool override, const char* key = ""); + static chanrec* JoinUser(InspIRCd* ServerInstance, userrec *user, const char* cn, bool override, const char* key = ""); /** Write to a channel, from a user, using va_args for text * @param user User whos details to prefix the line with |