]> jfr.im git - irc/quakenet/newserv.git/blobdiff - trusts/trusts.h
Fix up migration to use transactions, also start a commands module.
[irc/quakenet/newserv.git] / trusts / trusts.h
index 43afd6cc5484e0580da3afc1a90ea60332fa86bc..e2714efaf08010deec1460403312e44760befa4b 100644 (file)
@@ -8,6 +8,8 @@
 
 #define CONTACTLEN 100
 #define COMMENTLEN 300
+#define TRUSTNAMELEN 100
+#define TRUSTHOSTLEN 100
 
 struct trustmigration;
 
@@ -27,6 +29,14 @@ typedef struct trustmigration {
 
 typedef void (*TrustDBMigrationCallback)(int, void *);
 
+typedef struct trusthost {
+  sstring *host;
+  unsigned int maxseen;
+  time_t lastseen;
+
+  struct trusthost *next;
+} trusthost;
+
 typedef struct trustgroup {
   unsigned int id;
 
@@ -34,23 +44,20 @@ typedef struct trustgroup {
   unsigned int trustedfor;
   int mode;
   unsigned int maxperident;
+  unsigned int maxseen;
   time_t expires;
-  time_t latseeen;
+  time_t lastseen;
   time_t lastmaxuserreset;
-
   sstring *createdby, *contact, *comment;
 
+  trusthost *hosts;
+
   struct trustgroup *next;
 } trustgroup;
 
-typedef struct trusthost {
-  unsigned int id;
+void trusts_reloaddb(void);
 
-  sstring *mask;
-  unsigned int max;
-  time_t lastseen;
-
-  struct trusthost *next;
-} trusthost;
+extern int trustsdbloaded;
+extern trustgroup *tglist;
 
 #endif