From 580632d29ae6421afe7b2d4bd97323ace3bbdced Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 14 Apr 2005 13:27:40 +0000 Subject: Added OnUserKick and OnUserPreKick git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1086 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/modules.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index 451c939ef..b380b6e2f 100644 --- a/include/modules.h +++ b/include/modules.h @@ -232,7 +232,19 @@ class Module : public classbase */ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname); - + /** Called whenever a user is about to be kicked. + * Returning a value of 1 from this function stops the process immediately, causing no + * output to be sent to the user by the core. If you do this you must produce your own numerics, + * notices etc. + */ + virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason); + + /** Called whenever a user is kicked. + * If this method is called, the kick is already underway and cannot be prevented, so + * to prevent a kick, please use Module::OnUserPreKick instead of this method. + */ + virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason); + /** Called whenever a user opers locally. * The userrec will contain the oper mode 'o' as this function is called after any modifications * are made to the user's structure by the core. -- cgit v1.3.1-10-gc9f91