]> jfr.im git - irc/quakenet/newserv.git/blobdiff - regexgline/regexgline.h
CHANSERV: remove accidental sendemail from SETEMAIL command.
[irc/quakenet/newserv.git] / regexgline / regexgline.h
index 13667ff275cd9595484b549df121819b023e5301..b41906a3a7acd616ca93ece0a510de68d4612498 100644 (file)
@@ -45,6 +45,12 @@ typedef struct rg_struct {
   pcre             *regex;    /* pcre expression */
   pcre_extra       *hint;     /* pcre hint       */
   long             glineid;   /* gline ID */
+  const char       *class;    /* class of gline */
+  unsigned long    hits;      /* hits since we were loaded */
+  unsigned long    hitssaved; /* hits (persistent) */
+  unsigned int     marker;    /* newserv style marker */
+  time_t           lastseen;  /* ... */
+  short            dirty;     /* whether or not we need to flush to the db */
   struct rg_struct *next;     /* ... pointer to next item */
 } rg_struct;
 
@@ -55,6 +61,7 @@ void *rg_schedule = NULL;
 
 void rg_nick(int hooknum, void *arg);
 void rg_lostnick(int hooknum, void *arg);
+void rg_rename(int hooknum, void *arg);
 void rg_startup(void);
 
 int rg_gline(void *source, int cargc, char **cargv);
@@ -64,18 +71,19 @@ int rg_idlist(void *source, int cargc, char **cargv);
 int rg_spew(void *source, int cargc, char **cargv);
 int rg_sanitycheck(char *mask, int *count);
 
+
 int rg_dbconnect(void);
 void rg_dbload(void);
 
 void rg_freestruct(struct rg_struct *rp);
 struct rg_struct *rg_newstruct(time_t expires);
-struct rg_struct *rg_newsstruct(unsigned long id, char *mask, char *setby, char *reason, char *expires, char *type, time_t iexpires);
+struct rg_struct *rg_newsstruct(unsigned long id, char *mask, char *setby, char *reason, char *expires, char *type, time_t iexpires, char *class, time_t lastseen, unsigned int hitssaved);
 
-void rg_displaygline(nick *np, struct rg_struct *rp);
+void rg_displaygline(nick *np, struct rg_struct *rp, int longest);
 
 void rg_checkexpiry(void *arg);
 
-void rg_logevent(nick *np, char *event, char *details, ...);
+void rg_logevent(nick *np, char *event, char *details, ...) __attribute__ ((format (printf, 3, 4)));
 void rg_loggline(struct rg_struct *rg, nick *np);
 
 unsigned char rc_hexlookup[256] = {