]> jfr.im git - irc/quakenet/newserv.git/blobdiff - glines/glines.h
BUILD: add require-all build mode
[irc/quakenet/newserv.git] / glines / glines.h
index 38669562916ebd2e88f68ad249a835d76a6cafe1..a5d29d723d7c8a82c5edcf0802195c23e287ff46 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
 
@@ -94,6 +95,11 @@ typedef struct glinebuf {
   array hits;
 } glinebuf;
 
+typedef struct glineinfo {
+  int hits;
+  char *mask;
+} glineinfo;
+
 extern gline *glinelist;
 extern glinebuf *glinebuflog[MAXGLINELOG];
 extern int glinebuflogoffset;
@@ -117,14 +123,16 @@ char *glinetostring(gline *g);
 
 /* glines_util.c */
 int glinebyip(const char *user, struct irc_in_addr *ip, unsigned char bits, int duration, const char *reason, int flags, const char *creator);
+glineinfo *glinebynickex(nick *np, int duration, const char *reason, int flags, const char *creator);
 int glinebynick(nick *np, int duration, const char *reason, int flags, const char *creator);
 void glineunsetmask(const char *mask);
 
 /* glines_buf.c */
 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);
+char *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);
+char *glinebufaddbynick(glinebuf *gbuf, nick *, int flags, const char *creator, const char *reason, time_t expire, time_t lastmod, time_t lifetime);
+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);
@@ -134,6 +142,7 @@ 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 *);