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;
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);
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] = {