commit - b10d05f2d21ff3be02e844a539fcaf67e41655d1
commit + 213fa0994fab0a56a6d06395348bbe1c326b7af5
blob - 0808d4c32c18f4ae317741387f4bd1970409d1a8
blob + cf25001a56c57dd3dfff40d77be30dd61e070beb
--- src/ngircd/irc.c
+++ src/ngircd/irc.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: irc.c,v 1.56 2002/02/13 17:52:27 alex Exp $
+ * $Id: irc.c,v 1.57 2002/02/13 23:05:29 alex Exp $
*
* irc.c: IRC-Befehle
*
* $Log: irc.c,v $
+ * Revision 1.57 2002/02/13 23:05:29 alex
+ * - Nach Connect eines Users werden LUSERS-Informationen angezeigt.
+ *
* Revision 1.56 2002/02/13 17:52:27 alex
* - es werden nun Channel- und User-Modes von Usern angenommen.
*
LOCAL VOID Kill_Nick( CHAR *Nick );
LOCAL BOOLEAN Send_NAMES( CLIENT *Client, CHANNEL *Chan );
+LOCAL BOOLEAN Send_LUSERS( CLIENT *Client );
GLOBAL VOID IRC_Init( VOID )
GLOBAL BOOLEAN IRC_LUSERS( CLIENT *Client, REQUEST *Req )
{
CLIENT *target, *from;
- INT cnt;
assert( Client != NULL );
assert( Req != NULL );
else target = Client;
if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
- /* Users, Services und Serevr im Netz */
- if( ! IRC_WriteStrClient( target, RPL_LUSERCLIENT_MSG, Client_ID( target ), Client_UserCount( ), Client_ServiceCount( ), Client_ServerCount( ))) return DISCONNECTED;
-
- /* IRC-Operatoren im Netz */
- cnt = Client_OperCount( );
- if( cnt > 0 )
- {
- if( ! IRC_WriteStrClient( target, RPL_LUSEROP_MSG, Client_ID( target ), cnt )) return DISCONNECTED;
- }
-
- /* Unbekannt Verbindungen */
- cnt = Client_UnknownCount( );
- if( cnt > 0 )
- {
- if( ! IRC_WriteStrClient( target, RPL_LUSERUNKNOWN_MSG, Client_ID( target ), cnt )) return DISCONNECTED;
- }
+ Send_LUSERS( target );
- /* Channels im Netz */
- if( ! IRC_WriteStrClient( target, RPL_LUSERCHANNELS_MSG, Client_ID( target ), Channel_Count( ))) return DISCONNECTED;
-
- /* Channels im Netz */
- if( ! IRC_WriteStrClient( target, RPL_LUSERME_MSG, Client_ID( target ), Client_MyUserCount( ), Client_MyServiceCount( ), Client_MyServerCount( ))) return DISCONNECTED;
-
return CONNECTED;
} /* IRC_LUSERS */
Client_SetType( Client, CLIENT_USER );
- return Show_MOTD( Client );
+ if( ! Send_LUSERS( Client )) return DISCONNECTED;
+ if( ! Show_MOTD( Client )) return DISCONNECTED;
+
+ return CONNECTED;
} /* Hello_User */
} /* Send_NAMES */
+LOCAL BOOLEAN Send_LUSERS( CLIENT *Client )
+{
+ INT cnt;
+
+ assert( Client != NULL );
+
+ /* Users, Services und Serevr im Netz */
+ if( ! IRC_WriteStrClient( Client, RPL_LUSERCLIENT_MSG, Client_ID( Client ), Client_UserCount( ), Client_ServiceCount( ), Client_ServerCount( ))) return DISCONNECTED;
+
+ /* IRC-Operatoren im Netz */
+ cnt = Client_OperCount( );
+ if( cnt > 0 )
+ {
+ if( ! IRC_WriteStrClient( Client, RPL_LUSEROP_MSG, Client_ID( Client ), cnt )) return DISCONNECTED;
+ }
+
+ /* Unbekannt Verbindungen */
+ cnt = Client_UnknownCount( );
+ if( cnt > 0 )
+ {
+ if( ! IRC_WriteStrClient( Client, RPL_LUSERUNKNOWN_MSG, Client_ID( Client ), cnt )) return DISCONNECTED;
+ }
+
+ /* Channels im Netz */
+ if( ! IRC_WriteStrClient( Client, RPL_LUSERCHANNELS_MSG, Client_ID( Client ), Channel_Count( ))) return DISCONNECTED;
+
+ /* Channels im Netz */
+ if( ! IRC_WriteStrClient( Client, RPL_LUSERME_MSG, Client_ID( Client ), Client_MyUserCount( ), Client_MyServiceCount( ), Client_MyServerCount( ))) return DISCONNECTED;
+
+ return CONNECTED;
+} /* Send_LUSERS */
+
+
/* -eof- */