]> jfr.im git - irc/quakenet/newserv.git/blobdiff - glines/glines_commands.c
CHANSERV: remove accidental sendemail from SETEMAIL command.
[irc/quakenet/newserv.git] / glines / glines_commands.c
index 481c2309d38098988a8b95d9d666ce5086bfb819..6a68484f3fdbd382f4aab206162d5a7247725064 100644 (file)
@@ -13,6 +13,9 @@
 #include "glines.h"
 #include "../trusts/trusts.h"
 
+#define BLOCK_CHASE_MIN 5 /* seconds to chase nicknames in block without -c */
+#define BLOCK_CHASE_MAX 1800 /* seconds to chase nicknames in block with -c */
+
 MODULE_VERSION("");
 
 static void registercommands(int, void *);
@@ -92,10 +95,10 @@ static int glines_cmdblock(void *source, int cargc, char **cargv) {
   target = getnickbynick(cargv[coff]);
 
   if (!target) {
-    ww = whowas_chase(cargv[coff], 1800);
+    ww = whowas_chase(cargv[coff], chase ? BLOCK_CHASE_MAX : BLOCK_CHASE_MIN);
    
     if (!ww) {
-      controlreply(sender, "Sorry, couldn't find that user.");
+      controlreply(sender, "Sorry, couldn't find that user.%s", chase ? "" : " Use -c to chase whowas entries.");
       return CMD_ERROR;
     }
    
@@ -776,6 +779,11 @@ static int glines_cmdglist(void *source, int cargc, char **cargv) {
 
   gline *searchgl = makegline(mask);
 
+  if (!searchgl) {
+    controlreply(sender, "Invalid G-line mask specified.");
+    return CMD_ERROR;
+  }
+
   for (gl = glinelist; gl; gl = next) {
     next = gl->next;