]> jfr.im git - irc/quakenet/newserv.git/blobdiff - glines/glines.h
trusts: Throttle trusted clients if they disconnect too soon.
[irc/quakenet/newserv.git] / glines / glines.h
index 37a8be18b52ef57333359e184094276fc5aa58e8..c7f7e744812a0223ad1d725e4c761f422de5cf83 100644 (file)
@@ -4,6 +4,7 @@
 #include "../lib/sstring.h"
 #include "../nick/nick.h"
 #include "../channel/channel.h"
+#include "../whowas/whowas.h"
 
 #define SNIRCD_VERSION 134
 
@@ -74,6 +75,7 @@ typedef struct gline {
   time_t lifetime;
 
   unsigned int flags;
+  int glinebufid;
 
   struct gline *next;
 } gline;
@@ -82,10 +84,11 @@ typedef struct glinebuf {
   int id;
   sstring *comment;
   time_t commit;
-  time_t ammend;
+  time_t amend;
 
   gline *glines;
 
+  int hitsvalid;
   int userhits;
   int channelhits;
 
@@ -123,15 +126,17 @@ void glinebufinit(glinebuf *gbuf, int id);
 gline *glinebufadd(glinebuf *gbuf, const char *mask, const char *creator, const char *reason, time_t expire, time_t lastmod, time_t lifetime);
 void glinebufaddbyip(glinebuf *gbuf, const char *user, struct irc_in_addr *ip, unsigned char bits, int flags, const char *creator, const char *reason, time_t expire, time_t lastmod, time_t lifetime);
 void glinebufaddbynick(glinebuf *gbuf, nick *, int flags, const char *creator, const char *reason, time_t expire, time_t lastmod, time_t lifetime);
-void glinebufcounthits(glinebuf *gbuf, int *users, int *channels, nick *spewto);
-int glinebufchecksane(glinebuf *gbuf, nick *spewto, int overridesanity, int overridelimit, int spewhits);
+void glinebufaddbywhowas(glinebuf *gbuf, whowas *, int flags, const char *creator, const char *reason, time_t expire, time_t lastmod, time_t lifetime);
+void glinebufcounthits(glinebuf *gbuf, int *users, int *channels);
+int glinebufchecksane(glinebuf *gbuf, nick *spewto, int overridesanity, int overridelimit);
 void glinebufspew(glinebuf *gbuf, nick *spewto);
 void glinebufmerge(glinebuf *gbuf);
-void glinebufcommit(glinebuf *gbuf, int propagate);
+int glinebufcommit(glinebuf *gbuf, int propagate);
 void glinebufabort(glinebuf *gbuf);
 int glinebufundo(int id);
 void glinebufcommentf(glinebuf *gbuf, const char *format, ...);
 void glinebufcommentv(glinebuf *gbuf, const char *prefix, int cargc, char **cargv);
+int glinebufwritelog(glinebuf *gbuf, int propagating);
 
 /* glines_alloc.c */
 void freegline(gline *);