]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/authcmds/auth.c
CHANSERV: tell user when they can't attempts to auth any more, and drop max attempts...
[irc/quakenet/newserv.git] / chanserv / authcmds / auth.c
index 78cf6e5aeb88f32334f7f7c73f03d1dc9c2af309..ab9ce2271ab963cf1d4b0df7c62cc4ab08366877 100644 (file)
@@ -2,7 +2,7 @@
  *
  *
  * CMDNAME: auth
- * CMDALIASES: login
+ * CMDALIASES: login ircdauth
  * CMDLEVEL: QCMD_SECURE | QCMD_NOTAUTHED
  * CMDARGS: 2
  * CMDDESC: Authenticates you on the bot.
@@ -52,7 +52,7 @@ int csa_auth(void *source, int cargc, char **cargv, CRAlgorithm alg) {
         sender->nick, sender->ident, sender->host->name->content, aup->authattempts, authtype, cargv[0], cargv[1]);
 */
 
-    chanservstdmessage(sender, QM_AUTHFAIL);
+    chanservstdmessage(sender, QM_TOOMANYAUTHATTEMPTS);
     cs_log(sender,"%s FAIL too many auth attempts (last attempt: %s %s %s)", authtype, authtype, cargv[0], cargv[1]); 
     return CMD_ERROR;
   }
@@ -135,6 +135,10 @@ int csa_completeauth(nick *sender, reguser *rup, char *authtype) {
       chanservstdmessage(sender, QM_EXPIRES, rup->suspendexp);
     return CMD_ERROR;
   }
+  if (UIsInactive(rup)) {
+    chanservstdmessage(sender, QM_INACTIVEACCOUNT);
+    return CMD_ERROR;
+  }
   
   /* Guarantee a unique auth timestamp for each account */
   oldlastauth=rup->lastauth;