]> jfr.im git - irc/quakenet/newserv.git/commitdiff
CHANSERV: HACK: tempban/permban limits are now 20x normal if founder is an IRC operator
authorChris Porter <redacted>
Tue, 18 Sep 2012 23:32:53 +0000 (00:32 +0100)
committerChris Porter <redacted>
Tue, 18 Sep 2012 23:32:53 +0000 (00:32 +0100)
chanserv/chancmds/permban.c
chanserv/chancmds/tempban.c

index f96401076c985441e6b204b3a76fe9483ac59482..1cb5285c23fceb100ea7c6f61cab6abd6bca23a6 100644 (file)
@@ -85,9 +85,13 @@ int csc_dopermban(void *source, int cargc, char **cargv) {
   }
 
   if(count >= MAXBANS) {
-    freechanban(b);
-    chanservstdmessage(sender, QM_TOOMANYBANS);
-    return CMD_ERROR;
+    /* HACK: oper founder channels have 20x the ban limit */
+    reguser *founder=findreguserbyID(rcp->founder);
+    if(!founder || !UHasOperPriv(founder) || count >= MAXBANS * 20) {
+      freechanban(b);
+      chanservstdmessage(sender, QM_TOOMANYBANS);
+      return CMD_ERROR;
+    }
   }
 
   if(toreplace) {
index 4019948d0fc3ad31b4fc56408fedebd7777ca09e..ec409f0805841991d8224a9eb2ac29510d27935c 100644 (file)
@@ -97,9 +97,13 @@ int csc_dotempban(void *source, int cargc, char **cargv) {
   }
 
   if(count >= MAXBANS) {
-    freechanban(b);
-    chanservstdmessage(sender, QM_TOOMANYBANS);
-    return CMD_ERROR;
+    /* HACK: oper founder channels have 20x the ban limit */
+    reguser *founder=findreguserbyID(rcp->founder);
+    if(!founder || !UHasOperPriv(founder) || count >= MAXBANS * 20) {
+      freechanban(b);
+      chanservstdmessage(sender, QM_TOOMANYBANS);
+      return CMD_ERROR;
+    }
   }
 
   if(toreplace) {