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 --- src/inspircd.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 38c58179f..cc4ccd35c 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1780,7 +1780,6 @@ void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason) int MOD_RESULT = 0; FOREACH_RESULT(OnAccessCheck(src,user,Ptr,AC_KICK)); - if (MOD_RESULT == ACR_DENY) return; @@ -1800,7 +1799,14 @@ void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason) return; } } - + + MOD_RESULT = 0; + FOREACH_RESULT(OnUserPreKick(src,user,Ptr,reason)); + if (MOD_RESULT) + return; + + FOREACH_MOD OnUserKick(src,user,Ptr,reason); + for (int i =0; i != MAXCHANS; i++) { /* zap it from the channel list of the user */ @@ -1814,7 +1820,7 @@ void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason) break; } } - + /* if there are no users left on the channel */ if (!usercount(Ptr)) { -- cgit v1.2.3