]> 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 e879dcdd7368f694c2a7aa44bcf1bb9e78a7e087..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
@@ -24,8 +24,8 @@
 #include <errno.h>
 #include <stdio.h>
 #include <strings.h>
+#include <time.h>
 
-#include "defines.h"
 #include "conn-func.h"
 
 #include "channel.h"
@@ -33,7 +33,6 @@
 #include "irc-write.h"
 #include "conf.h"
 #include "hash.h"
-#include "lists.h"
 #include "log.h"
 #include "messages.h"
 #include "match.h"
@@ -360,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,