mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-15 18:15:40 +00:00
- neuer IRC-Befehl VERSION implementiert: IRC_VERSION().
This commit is contained in:
parent
00529c8fbd
commit
458174ffb0
@ -9,11 +9,14 @@
|
|||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
||||||
*
|
*
|
||||||
* $Id: irc.c,v 1.61 2002/02/17 19:03:12 alex Exp $
|
* $Id: irc.c,v 1.62 2002/02/17 23:38:58 alex Exp $
|
||||||
*
|
*
|
||||||
* irc.c: IRC-Befehle
|
* irc.c: IRC-Befehle
|
||||||
*
|
*
|
||||||
* $Log: irc.c,v $
|
* $Log: irc.c,v $
|
||||||
|
* Revision 1.62 2002/02/17 23:38:58 alex
|
||||||
|
* - neuer IRC-Befehl VERSION implementiert: IRC_VERSION().
|
||||||
|
*
|
||||||
* Revision 1.61 2002/02/17 19:03:12 alex
|
* Revision 1.61 2002/02/17 19:03:12 alex
|
||||||
* - NICK-Aenderungen wurden dem User selber mit dem falschen Prefix geliefert.
|
* - NICK-Aenderungen wurden dem User selber mit dem falschen Prefix geliefert.
|
||||||
*
|
*
|
||||||
@ -2037,6 +2040,32 @@ GLOBAL BOOLEAN IRC_PART( CLIENT *Client, REQUEST *Req )
|
|||||||
} /* IRC_PART */
|
} /* IRC_PART */
|
||||||
|
|
||||||
|
|
||||||
|
GLOBAL BOOLEAN IRC_VERSION( CLIENT *Client, REQUEST *Req )
|
||||||
|
{
|
||||||
|
CLIENT *target;
|
||||||
|
|
||||||
|
assert( Client != NULL );
|
||||||
|
assert( Req != NULL );
|
||||||
|
|
||||||
|
/* Falsche Anzahl Parameter? */
|
||||||
|
if(( Req->argc > 1 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
|
||||||
|
|
||||||
|
/* Ziel suchen */
|
||||||
|
if( Req->argc == 1 ) target = Client_GetFromID( Req->argv[0] );
|
||||||
|
else target = Client_ThisServer( );
|
||||||
|
|
||||||
|
/* An anderen Server weiterleiten? */
|
||||||
|
if( target != Client_ThisServer( ))
|
||||||
|
{
|
||||||
|
if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[0] );
|
||||||
|
IRC_WriteStrClientPrefix( Client_NextHop( target ), Client, "VERSION %s", Req->argv[0] );
|
||||||
|
return CONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( Client ), NGIRCd_Debug ? ( NGIRCd_Sniffer ? "2" : "1" ) : "0", Conf_ServerName, NGIRCd_VersionAddition( ));
|
||||||
|
} /* IRC_VERSION */
|
||||||
|
|
||||||
|
|
||||||
LOCAL BOOLEAN Hello_User( CLIENT *Client )
|
LOCAL BOOLEAN Hello_User( CLIENT *Client )
|
||||||
{
|
{
|
||||||
assert( Client != NULL );
|
assert( Client != NULL );
|
||||||
|
@ -9,11 +9,14 @@
|
|||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
||||||
*
|
*
|
||||||
* $Id: irc.h,v 1.22 2002/02/17 17:18:59 alex Exp $
|
* $Id: irc.h,v 1.23 2002/02/17 23:38:58 alex Exp $
|
||||||
*
|
*
|
||||||
* irc.h: IRC-Befehle (Header)
|
* irc.h: IRC-Befehle (Header)
|
||||||
*
|
*
|
||||||
* $Log: irc.h,v $
|
* $Log: irc.h,v $
|
||||||
|
* Revision 1.23 2002/02/17 23:38:58 alex
|
||||||
|
* - neuer IRC-Befehl VERSION implementiert: IRC_VERSION().
|
||||||
|
*
|
||||||
* Revision 1.22 2002/02/17 17:18:59 alex
|
* Revision 1.22 2002/02/17 17:18:59 alex
|
||||||
* - NICK korrigiert.
|
* - NICK korrigiert.
|
||||||
*
|
*
|
||||||
@ -118,6 +121,7 @@ GLOBAL BOOLEAN IRC_PING( CLIENT *Client, REQUEST *Req );
|
|||||||
GLOBAL BOOLEAN IRC_PONG( CLIENT *Client, REQUEST *Req );
|
GLOBAL BOOLEAN IRC_PONG( CLIENT *Client, REQUEST *Req );
|
||||||
GLOBAL BOOLEAN IRC_QUIT( CLIENT *Client, REQUEST *Req );
|
GLOBAL BOOLEAN IRC_QUIT( CLIENT *Client, REQUEST *Req );
|
||||||
GLOBAL BOOLEAN IRC_SQUIT( CLIENT *Client, REQUEST *Req );
|
GLOBAL BOOLEAN IRC_SQUIT( CLIENT *Client, REQUEST *Req );
|
||||||
|
GLOBAL BOOLEAN IRC_VERSION( CLIENT *Client, REQUEST *Req );
|
||||||
|
|
||||||
GLOBAL BOOLEAN IRC_MOTD( CLIENT *Client, REQUEST *Req );
|
GLOBAL BOOLEAN IRC_MOTD( CLIENT *Client, REQUEST *Req );
|
||||||
GLOBAL BOOLEAN IRC_LUSERS( CLIENT *Client, REQUEST *Req );
|
GLOBAL BOOLEAN IRC_LUSERS( CLIENT *Client, REQUEST *Req );
|
||||||
|
@ -9,11 +9,14 @@
|
|||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
||||||
*
|
*
|
||||||
* $Id: parse.c,v 1.22 2002/01/21 00:01:37 alex Exp $
|
* $Id: parse.c,v 1.23 2002/02/17 23:38:58 alex Exp $
|
||||||
*
|
*
|
||||||
* parse.c: Parsen der Client-Anfragen
|
* parse.c: Parsen der Client-Anfragen
|
||||||
*
|
*
|
||||||
* $Log: parse.c,v $
|
* $Log: parse.c,v $
|
||||||
|
* Revision 1.23 2002/02/17 23:38:58 alex
|
||||||
|
* - neuer IRC-Befehl VERSION implementiert: IRC_VERSION().
|
||||||
|
*
|
||||||
* Revision 1.22 2002/01/21 00:01:37 alex
|
* Revision 1.22 2002/01/21 00:01:37 alex
|
||||||
* - neue Befehle JOIN und PART.
|
* - neue Befehle JOIN und PART.
|
||||||
*
|
*
|
||||||
@ -367,6 +370,7 @@ LOCAL BOOLEAN Handle_Request( CONN_ID Idx, REQUEST *Req )
|
|||||||
else if( strcasecmp( Req->command, "LINKS" ) == 0 ) return IRC_LINKS( client, Req );
|
else if( strcasecmp( Req->command, "LINKS" ) == 0 ) return IRC_LINKS( client, Req );
|
||||||
else if( strcasecmp( Req->command, "JOIN" ) == 0 ) return IRC_JOIN( client, Req );
|
else if( strcasecmp( Req->command, "JOIN" ) == 0 ) return IRC_JOIN( client, Req );
|
||||||
else if( strcasecmp( Req->command, "PART" ) == 0 ) return IRC_PART( client, Req );
|
else if( strcasecmp( Req->command, "PART" ) == 0 ) return IRC_PART( client, Req );
|
||||||
|
else if( strcasecmp( Req->command, "VERSION" ) == 0 ) return IRC_VERSION( client, Req );
|
||||||
|
|
||||||
/* Unbekannter Befehl */
|
/* Unbekannter Befehl */
|
||||||
if( Client_Type( client ) != CLIENT_SERVER ) IRC_WriteStrClient( client, ERR_UNKNOWNCOMMAND_MSG, Client_ID( client ), Req->command );
|
if( Client_Type( client ) != CLIENT_SERVER ) IRC_WriteStrClient( client, ERR_UNKNOWNCOMMAND_MSG, Client_ID( client ), Req->command );
|
||||||
|
Loading…
Reference in New Issue
Block a user