]> jfr.im git - solanum.git/blobdiff - modules/core/m_kick.c
ircd/dns: same
[solanum.git] / modules / core / m_kick.c
index 1567f2f9ba062b8d4c5531f3d937e72c21a007f9..387534612a55a0800d06fd86722c109cc259fbfb 100644 (file)
@@ -97,7 +97,7 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p
                        return 0;
                }
 
-               if(!is_chanop(msptr))
+               if(get_channel_access(source_p, msptr, MODE_ADD) < CHFL_CHANOP)
                {
                        if(MyConnect(source_p))
                        {
@@ -120,12 +120,12 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p
                 * There are two cases we can get to this point then...
                 *
                 *     1) connect burst is happening, and for some reason a legit
-                *        op has sent a KICK, but the SJOIN hasn't happened yet or 
+                *        op has sent a KICK, but the SJOIN hasn't happened yet or
                 *        been seen. (who knows.. due to lag...)
                 *
                 *     2) The channel is desynced. That can STILL happen with TS
-                *        
-                *     Now, the old code roger wrote, would allow the KICK to 
+                *
+                *     Now, the old code roger wrote, would allow the KICK to
                 *     go through. Thats quite legit, but lets weird things like
                 *     KICKS by users who appear not to be chanopped happen,
                 *     or even neater, they appear not to be on the channel.
@@ -167,6 +167,7 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p
                        hookdata.msptr = msptr;
                        hookdata.target = who;
                        hookdata.approved = 1;
+                       hookdata.dir = MODE_ADD;        /* ensure modules like override speak up */
 
                        call_hook(h_can_kick, &hookdata);