]> jfr.im git - irc/quakenet/newserv.git/blobdiff - whowas/whowas.h
Merge pull request #1 from meeb/meeb
[irc/quakenet/newserv.git] / whowas / whowas.h
index b24aff30523597c84946f4f7f6e8ac67e4c1a0e1..5c02bde0e27ed1ec8f815cc582039590b84ecc90 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef __WHOWAS_H
 #define __WHOWAS_H
 
-#define WW_MAXAGE 3600
-#define WW_MAXENTRIES 250000
+#define WW_MAXCHANNELS 20
+#define WW_DEFAULT_MAXENTRIES 1000
 #define WW_MASKLEN (HOSTLEN + USERLEN + NICKLEN)
 #define WW_REASONLEN 512
 
@@ -10,6 +10,7 @@ typedef struct whowas {
   int type;
   time_t timestamp;
   nick nick; /* unlinked nick */
+  chanindex *channels[WW_MAXCHANNELS];
 
   /* WHOWAS_QUIT or WHOWAS_KILL */
   sstring *reason;
@@ -23,7 +24,8 @@ typedef struct whowas {
   struct whowas *prev;
 } whowas;
 
-extern whowas whowasrecs[WW_MAXENTRIES];
+extern whowas *whowasrecs;
+extern int whowasmax;
 extern int whowasoffset; /* points to oldest record */
 
 #define WHOWAS_UNUSED 0
@@ -37,6 +39,7 @@ nick *whowas_tonick(whowas *ww);
 void whowas_freenick(nick *np);
 whowas *whowas_chase(const char *target, int maxage);
 const char *whowas_format(whowas *ww);
+const char *whowas_formatchannels(whowas *ww);
 void whowas_clean(whowas *ww);
 void whowas_free(whowas *ww);