Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_user.c
index 33dd470ce18c50d5f829cf0059d1eed779128f57..efbe6eb853e2ccef30aba8b684815709159e8a2e 100644 (file)
@@ -144,7 +144,9 @@ int m_user(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   user->server = &me;
   ircd_strncpy(cli_info(cptr), info, REALLEN);
 
-  if ((cli_name(cptr))[0] && cli_cookie(cptr) == COOKIE_VERIFIED) {
+  cli_unreg(sptr) &= ~CLIREG_USER; /* username now set */
+
+  if (!cli_unreg(sptr)) {
     /*
      * NICK and PONG already received, now we have USER...
      */