]> 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 12bd8128b4f803b414c5e5a5ed594d8a53be7953..e74cd6eb1dfcc4358668a1c5ec18ec040471d697 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
 /*
  * 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
  *
  * 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
  */
 
  * Channel management
  */
 
-#include "imp.h"
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
 #include <strings.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 "conn-func.h"
 
-#include "exp.h"
 #include "channel.h"
 
 #include "channel.h"
 
-#include "imp.h"
 #include "irc-write.h"
 #include "conf.h"
 #include "hash.h"
 #include "irc-write.h"
 #include "conf.h"
 #include "hash.h"
-#include "lists.h"
 #include "log.h"
 #include "messages.h"
 #include "match.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
 #define REMOVE_PART 0
 #define REMOVE_QUIT 1
 #define REMOVE_KICK 2
@@ -366,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;
                    !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,
 
                if(!can_kick) {
                        IRC_WriteErrClient(Origin, ERR_CHANOPPRIVTOOLOW_MSG,