X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/e4187163d2f41e9954904614c7afe7257c8a041f..060903591ca9407068724102801fe6e8275e81c6:/fsck/fsck.c diff --git a/fsck/fsck.c b/fsck/fsck.c index 1f5bda03..536fed22 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -4,6 +4,9 @@ #include "../nick/nick.h" #include "../channel/channel.h" #include "../server/server.h" +#include "../lib/version.h" + +MODULE_VERSION("") int dofsck(void *source, int cargc, char **cargv); @@ -22,6 +25,7 @@ int dofsck(void *source, int cargc, char **cargv) { realname *rnp; unsigned int nickmarker; int errors=0; + unsigned int nummask,mnum; /* Start off with strict nick consistency checks.. */ @@ -41,6 +45,11 @@ int dofsck(void *source, int cargc, char **cargv) { for (i=0;inext) { + if (np->marker==nickmarker) { + controlreply(sender, "ERROR: bumped into the same nick %s/%s twice in hash table.",longtonumeric(np->numeric,5),np->nick); + errors++; + } + /* Mark this nick so we can check we found them all */ np->marker=nickmarker; @@ -129,13 +138,20 @@ int dofsck(void *source, int cargc, char **cargv) { for(i=0;inumeric & nummask) != mnum) { + controlreply(sender, "ERROR: nick %s/%s has wrong masked numeric.",longtonumeric(np->numeric,5),np->nick); + errors++; + } if (np->marker != nickmarker) { controlreply(sender, "ERROR: nick %s/%s in server user table but not hash!", longtonumeric(np->numeric,5),np->nick); errors++; } + np->marker=0; } } }