]> jfr.im git - irc/quakenet/newserv.git/blobdiff - regexgline/regexgline.c
CHANSERV: better batcher error handling for expired accounts/accounts with no email.
[irc/quakenet/newserv.git] / regexgline / regexgline.c
index 0f059e343979f31b42d6f1881fadd77932f5faba..565e33eb11e460fac6b157b2489a471e9efd9cc0 100644 (file)
@@ -170,7 +170,7 @@ int rg_rescan(void *source, int cargc, char **cargv) {
 }
 
 void _fini(void) {
-  struct rg_struct *gp = rg_list, *oldgp;
+  struct rg_struct *gp, *oldgp;
   rg_delay *delay, *delaynext;
   
   if(started) {
@@ -343,7 +343,7 @@ void rg_dodelay(void *arg) {
   
   rg_shadowserver(delay->np, delay->reason, delay->reason->type);
   snprintf(reason, sizeof(reason), "AUTO: %s (ID: %08lx)", delay->reason->reason->content, delay->reason->glineid);
-  glinebynick(delay->np, rg_expiry_time, reason, glineflags);
+  glinebynick(delay->np, rg_expiry_time, reason, glineflags, "regexgline");
   rg_deletedelay(delay);
 }
 
@@ -816,7 +816,7 @@ char *displaytype(int type) {
       ctype = "??";
   }
 
-  snprintf(ctypebuf, sizeof(ctype), "%1d:%s", type, ctype);
+  snprintf(ctypebuf, sizeof(ctypebuf), "%1d:%s", type, ctype);
   return ctypebuf;
 }
 
@@ -1078,7 +1078,7 @@ struct rg_struct *rg_newsstruct(unsigned long id, char *mask, char *setby, char
       newrow->type = 0; /* just in case */
 
     snprintf(glineiddata, sizeof(glineiddata), "%s regexgline %s %s %s %d %d", mynumeric->content, mask, setby, reason, (int)iexpires, newrow->type);
-    newrow->glineid = crc32(glineiddata);
+    newrow->glineid = irc_crc32(glineiddata);
   }
   
   return newrow;
@@ -1134,7 +1134,7 @@ int __rg_dogline(struct rg_glinelist *gll, nick *np, struct rg_struct *rp, char
   if(!strcmp(rp->class, RESERVED_NICK_CLASS)) {
     char reason[512];
     snprintf(reason, sizeof(reason), "AUTO %s (ID: %08lx)", rp->reason->content, rp->glineid);
-    glinebynick(np, RESERVED_NICK_GLINE_DURATION, reason, GLINE_ALWAYS_NICK);
+    glinebynick(np, RESERVED_NICK_GLINE_DURATION, reason, GLINE_ALWAYS_NICK, "regexgline");
   }
 
   validdelay = (rp->type == INSTANT_KILL) || (rp->type == DELAYED_IDENT_GLINE) || (rp->type == DELAYED_HOST_GLINE) || (rp->type == DELAYED_KILL);
@@ -1171,7 +1171,7 @@ int __rg_dogline(struct rg_glinelist *gll, nick *np, struct rg_struct *rp, char
   
   rg_shadowserver(np, rp, rp->type);
   snprintf(reason, sizeof(reason), "AUTO: %s (ID: %08lx)", rp->reason->content, rp->glineid);
-  glinebynick(np, rg_expiry_time, reason, glineflags);
+  glinebynick(np, rg_expiry_time, reason, glineflags, "regexgline");
   return usercount;
 }
 
@@ -1254,15 +1254,15 @@ void rg_loggline(struct rg_struct *rg, nick *np) {
   rg->lastseen = time(NULL);
   rg->dirty = 1;
 
-  /* @paul: disabled */
+  /* @paul: disabled
 
-  return;
   dbescapestring(eenick, np->nick, strlen(np->nick));
   dbescapestring(eeuser, np->ident, strlen(np->ident));
   dbescapestring(eehost, np->host->name->content, strlen(np->host->name->content));
   dbescapestring(eereal, np->realname->name->content, strlen(np->realname->name->content));
 
   dbquery("INSERT INTO regexgline.glog (glineid, nickname, username, hostname, realname, ts) VALUES (%d, '%s', '%s', '%s', '%s', NOW())", rg->id, eenick, eeuser, eehost, eereal);
+  */
 }
 
 static unsigned int getrgmarker(void) {