]> jfr.im git - irc/quakenet/newserv.git/blobdiff - trusts/data.c
Trusts now stores an id for each trusthost, doing updates by string sucked.
[irc/quakenet/newserv.git] / trusts / data.c
index c9bb1f101145f8efe04d9dbb6a821760c0687ef3..898ee1f448ee8f7e031f86f9ed1dd0e151dd9731 100644 (file)
@@ -40,7 +40,7 @@ void th_free(trusthost *th) {
   free(th);
 }
 
-int th_add(trustgroup *tg, char *host, unsigned int maxusage, time_t lastseen) {
+int th_add(trustgroup *tg, unsigned int id, char *host, unsigned int maxusage, time_t lastseen) {
   u_int32_t ip, mask;
   trusthost *th;
 
@@ -51,6 +51,7 @@ int th_add(trustgroup *tg, char *host, unsigned int maxusage, time_t lastseen) {
   if(!th)
     return 0;
 
+  th->id = id;
   th->maxusage = maxusage;
   th->lastseen = lastseen;
   th->ip = ip;