diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-24 15:13:17 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-24 15:13:17 +0000 |
commit | 343f12b9b2d4e519b09877f76a00f6a0714509f2 (patch) | |
tree | b51aee0ca78a19fd356cdc2788cab4530c7928c1 /include | |
parent | 638381c529a2f19c699718234d689e54ad459c97 (diff) |
Add stuff so that modules can hook users by altering a pointer in the User class. Note that ssl modules still bind by port, but the idea of doing this change is so we can remove that logic next
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9187 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/modules.h | 4 | ||||
-rw-r--r-- | include/users.h | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index 693fd41fb..de0e0d7fe 100644 --- a/include/modules.h +++ b/include/modules.h @@ -401,7 +401,7 @@ enum Implementation I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnCancelAway, I_OnUserList, I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect, I_OnBufferFlushed, - I_OnText, I_OnReadConfig, I_OnDownloadFile, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, + I_OnText, I_OnReadConfig, I_OnDownloadFile, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, I_OnHookUserIO, I_END }; @@ -1245,6 +1245,8 @@ class CoreExport Module : public Extensible */ virtual int OnDelBan(User* source, Channel* channel,const std::string &banmask); + virtual void OnHookUserIO(User* user); + /** Called immediately after any connection is accepted. This is intended for raw socket * processing (e.g. modules which wrap the tcp connection within another library) and provides * no information relating to a user record as the connection has not been assigned yet. diff --git a/include/users.h b/include/users.h index 07843b7c0..74b55202d 100644 --- a/include/users.h +++ b/include/users.h @@ -464,6 +464,10 @@ class CoreExport User : public connection bool* AllowedChanModes; public: + /** Module responsible for raw i/o + */ + Module* io; + /** Contains a pointer to the connect class a user is on from - this will be NULL for remote connections. * The pointer is guarenteed to *always* be valid. :) */ |