[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

user.patch



user.patch (1222 bytes)

Enhanced files: ircd/s_user.c

Modifies m_user to update the user count for the local server before 
calling m_lusers for a connecting client.  Before, the count would 
be changed after sending LUSERS and MOTD, showing the 
connecting client that it was still an unknown connection.

-- David-R <rientjes@xxxxxxxxxxxxxxxx>


diff -ru irc2.10.3b14/ircd/s_user.c irc2.10.3b14.user/ircd/s_user.c
--- irc2.10.3b14/ircd/s_user.c	Sat Jul 17 04:47:49 1999
+++ irc2.10.3b14.user/ircd/s_user.c	Thu Dec 23 15:37:05 1999
@@ -616,6 +616,17 @@
 		sendto_one(sptr, rpl_str(RPL_CREATED, nick), creation);
 		sendto_one(sptr, rpl_str(RPL_MYINFO, parv[0]),
 			   ME, version);
+		/* Update the user counts for the local server BEFORE calling *
+		 * m_lusers upon connecting.  -- David-R                      */
+		if (IsInvisible(sptr))		/* Can be initialized in m_user() */
+			istat.is_user[1]++;	/* Local and server defaults +i */
+		else
+			istat.is_user[0]++;
+		if (MyConnect(sptr))
+		    {
+			istat.is_unknown--;
+			istat.is_myclnt++;
+		    }
 		(void)m_lusers(sptr, sptr, 1, parv);
 		(void)m_motd(sptr, sptr, 1, parv);
 		nextping = timeofday;
@@ -661,15 +672,6 @@
 		send_umode(sptr, sptr, 0, ALL_UMODES, buf);
 	    }
 
-	if (IsInvisible(sptr))		/* Can be initialized in m_user() */
-		istat.is_user[1]++;	/* Local and server defaults +i */
-	else
-		istat.is_user[0]++;
-	if (MyConnect(sptr))
-	    {
-		istat.is_unknown--;
-		istat.is_myclnt++;
-	    }
 #ifdef	USE_SERVICES
 #if 0
 	check_services_butone(SERVICE_WANT_NICK, user->server, NULL,