Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_pong.c
index 026cd6bbeee40ac06cc501f04150a12dd9bbc972..f66668d41432de98867ce68ad0b8b61a4081e57f 100644 (file)
@@ -84,6 +84,7 @@
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
+#include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "msg.h"
@@ -93,7 +94,7 @@
 #include "s_user.h"
 #include "send.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 #include <stdlib.h>
 
@@ -169,7 +170,8 @@ int mr_pong(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   if (0 != cli_cookie(sptr) && COOKIE_VERIFIED != cli_cookie(sptr)) {
     if (parc > 1 && cli_cookie(sptr) == atol(parv[parc - 1])) {
       cli_cookie(sptr) = COOKIE_VERIFIED;
-      if (cli_user(sptr) && *(cli_user(sptr))->host && (cli_name(sptr))[0])
+      cli_unreg(sptr) &= ~CLIREG_COOKIE; /* cookie has been returned... */
+      if (!cli_unreg(sptr)) /* no more registration tasks... */
         /*
          * NICK and USER OK
          */