]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/channel.c
IRC operators w/OperCanMode can kick anyone
[ngircd-alex.git] / src / ngircd / channel.c
index 6b8d74530c7c07c71c532e2379387c97bf1596a3..e74cd6eb1dfcc4358668a1c5ec18ec040471d697 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * Channel management
  */
 
-#include "imp.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
 #include <strings.h>
+#include <time.h>
 
-#include "defines.h"
 #include "conn-func.h"
 
-#include "exp.h"
 #include "channel.h"
 
-#include "imp.h"
 #include "irc-write.h"
 #include "conf.h"
 #include "hash.h"
-#include "lists.h"
 #include "log.h"
 #include "messages.h"
 #include "match.h"
 
-#include "exp.h"
-
-
 #define REMOVE_PART 0
 #define REMOVE_QUIT 1
 #define REMOVE_KICK 2
 
-
 static CHANNEL *My_Channels;
 static CL2CHAN *My_Cl2Chan;
 
-
 static CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client ));
 static CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client ));
 static bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const char *Reason, bool InformServer ));
@@ -368,6 +359,11 @@ Channel_Kick(CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name,
                    !Channel_UserHasMode(chan, Target, 'a') &&
                    !Channel_UserHasMode(chan, Target, 'o'))
                        can_kick = true;
+               
+               /* IRC operators & IRCd with OperCanMode enabled
+                * can kick anyways regardless of privilege */  
+               else if(Client_HasMode(Origin, 'o') && Conf_OperCanMode)
+                   can_kick = true;
 
                if(!can_kick) {
                        IRC_WriteErrClient(Origin, ERR_CHANOPPRIVTOOLOW_MSG,