implement IAUTH client code to query a separate server before allowing
[ircu2.10.12-pk.git] / ircd / s_user.c
index 4082ea39c49ac11b31e6627f2b310b61c3cf1464..2aefc68517d0aa7fd112a98ffe30df147434e5b6 100644 (file)
@@ -32,6 +32,7 @@
 #include "hash.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
+#include "ircd_auth.h"
 #include "ircd_chattr.h"
 #include "ircd_features.h"
 #include "ircd_log.h"
@@ -375,6 +376,12 @@ int register_user(struct Client *cptr, struct Client *sptr,
     static time_t last_too_many2;
 
     assert(cptr == sptr);
+    if (!IsIAuthed(sptr)) {
+      if (iauth_active)
+        return iauth_start_client(iauth_active, sptr);
+      else
+        SetIAuthed(sptr);
+    }
     switch (conf_check_client(sptr))
     {
       case ACR_OK: