2001-12-22 00:53:16 +01:00
|
|
|
/*
|
|
|
|
* ngIRCd -- The Next Generation IRC Daemon
|
2002-01-02 03:43:22 +01:00
|
|
|
* Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
|
2001-12-22 00:53:16 +01:00
|
|
|
*
|
|
|
|
* Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
|
|
|
|
* der GNU General Public License (GPL), wie von der Free Software Foundation
|
|
|
|
* herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
|
|
|
|
* der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
|
|
|
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
2001-12-31 03:18:51 +01:00
|
|
|
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
2001-12-22 00:53:16 +01:00
|
|
|
*
|
2002-01-21 01:01:37 +01:00
|
|
|
* $Id: parse.c,v 1.22 2002/01/21 00:01:37 alex Exp $
|
2001-12-22 00:53:16 +01:00
|
|
|
*
|
|
|
|
* parse.c: Parsen der Client-Anfragen
|
|
|
|
*
|
|
|
|
* $Log: parse.c,v $
|
2002-01-21 01:01:37 +01:00
|
|
|
* Revision 1.22 2002/01/21 00:01:37 alex
|
|
|
|
* - neue Befehle JOIN und PART.
|
|
|
|
*
|
2002-01-18 12:12:11 +01:00
|
|
|
* Revision 1.21 2002/01/18 11:12:11 alex
|
|
|
|
* - der Sniffer wird nun nur noch aktiviert, wenn auf Kommandozeile angegeben.
|
|
|
|
*
|
2002-01-12 00:50:55 +01:00
|
|
|
* Revision 1.20 2002/01/11 23:50:55 alex
|
|
|
|
* - LINKS implementiert, LUSERS begonnen.
|
|
|
|
*
|
2002-01-09 02:08:42 +01:00
|
|
|
* Revision 1.19 2002/01/09 01:08:42 alex
|
|
|
|
* - Parses handhabt Leerzeichen zw. Parametern nun etwas "lockerer".
|
|
|
|
*
|
2002-01-07 16:29:11 +01:00
|
|
|
* Revision 1.18 2002/01/07 15:29:11 alex
|
|
|
|
* - Status-Codes an den Server selber werden ignoriert, besseres Logging.
|
|
|
|
*
|
2002-01-06 18:41:44 +01:00
|
|
|
* Revision 1.17 2002/01/06 17:41:44 alex
|
|
|
|
* - die Fehlermeldung "unbekannter Befehl" hatte ein falsches Format.
|
|
|
|
*
|
2002-01-06 00:23:20 +01:00
|
|
|
* Revision 1.16 2002/01/05 23:23:20 alex
|
|
|
|
* - generisches Forwarding von Zahlen-Statuscodes implementiert.
|
|
|
|
*
|
2002-01-05 02:42:08 +01:00
|
|
|
* Revision 1.15 2002/01/05 01:42:08 alex
|
|
|
|
* - an Server werden keine ERRORS mehr wegen unbekannter Befehle geschickt.
|
|
|
|
*
|
2002-01-04 18:56:45 +01:00
|
|
|
* Revision 1.14 2002/01/04 17:56:45 alex
|
|
|
|
* - neuer Befehl SQUIT.
|
|
|
|
*
|
2002-01-04 02:20:02 +01:00
|
|
|
* Revision 1.13 2002/01/04 01:20:02 alex
|
|
|
|
* - Client-Strukruren werden nur noch ueber Funktionen angesprochen.
|
|
|
|
*
|
2002-01-03 03:24:49 +01:00
|
|
|
* Revision 1.12 2002/01/03 02:24:49 alex
|
|
|
|
* - neue Befehle NJOIN und SERVER begonnen.
|
|
|
|
*
|
2002-01-02 03:43:22 +01:00
|
|
|
* Revision 1.11 2002/01/02 02:43:22 alex
|
|
|
|
* - Copyright-Texte aktualisiert.
|
|
|
|
* - neuer Befehl ERROR.
|
|
|
|
*
|
2001-12-31 16:33:13 +01:00
|
|
|
* Revision 1.10 2001/12/31 15:33:13 alex
|
|
|
|
* - neuer Befehl NAMES, kleinere Bugfixes.
|
|
|
|
* - Bug bei PING behoben: war zu restriktiv implementiert :-)
|
|
|
|
*
|
2001-12-31 03:18:51 +01:00
|
|
|
* Revision 1.9 2001/12/31 02:18:51 alex
|
|
|
|
* - viele neue Befehle (WHOIS, ISON, OPER, DIE, RESTART),
|
|
|
|
* - neuen Header "defines.h" mit (fast) allen Konstanten.
|
|
|
|
* - Code Cleanups und viele "kleine" Aenderungen & Bugfixes.
|
|
|
|
*
|
2001-12-29 04:08:19 +01:00
|
|
|
* Revision 1.8 2001/12/29 03:08:19 alex
|
|
|
|
* - Fuehrende und folgende Leerzeichen etc. in Requests werden geloescht.
|
|
|
|
* - Logmeldungen (mal wieder) ein wenig angepasst.
|
|
|
|
*
|
2001-12-27 20:13:21 +01:00
|
|
|
* Revision 1.7 2001/12/27 19:13:21 alex
|
|
|
|
* - neue Befehle NOTICE und PRIVMSG.
|
|
|
|
* - Debug-Logging ein wenig reduziert.
|
|
|
|
*
|
2001-12-26 15:45:37 +01:00
|
|
|
* Revision 1.6 2001/12/26 14:45:37 alex
|
|
|
|
* - "Code Cleanups".
|
|
|
|
*
|
2001-12-26 04:23:03 +01:00
|
|
|
* Revision 1.5 2001/12/26 03:23:03 alex
|
|
|
|
* - PING/PONG-Befehle implementiert.
|
|
|
|
*
|
2001-12-25 23:04:26 +01:00
|
|
|
* Revision 1.4 2001/12/25 22:04:26 alex
|
|
|
|
* - Aenderungen an den Debug- und Logging-Funktionen.
|
|
|
|
*
|
2001-12-25 20:18:36 +01:00
|
|
|
* Revision 1.3 2001/12/25 19:18:36 alex
|
|
|
|
* - Gross- und Kleinschreibung der IRC-Befehle wird ignoriert.
|
|
|
|
* - bessere Debug-Ausgaben.
|
|
|
|
*
|
2001-12-23 22:56:47 +01:00
|
|
|
* Revision 1.2 2001/12/23 21:56:47 alex
|
|
|
|
* - bessere Debug-Ausgaben,
|
|
|
|
* - Bug im Parameter-Parser behoben (bei "langem" Parameter)
|
|
|
|
* - erste IRC-Befehle werden erkannt :-)
|
|
|
|
*
|
2001-12-22 00:53:16 +01:00
|
|
|
* Revision 1.1 2001/12/21 23:53:16 alex
|
|
|
|
* - Modul zum Parsen von Client-Requests begonnen.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <portab.h>
|
|
|
|
#include "global.h"
|
|
|
|
|
|
|
|
#include <imp.h>
|
|
|
|
#include <assert.h>
|
2002-01-06 00:23:20 +01:00
|
|
|
#include <stdlib.h>
|
2001-12-22 00:53:16 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2002-01-18 12:12:11 +01:00
|
|
|
#include "ngircd.h"
|
2001-12-23 22:56:47 +01:00
|
|
|
#include "client.h"
|
2001-12-22 00:53:16 +01:00
|
|
|
#include "conn.h"
|
2001-12-23 22:56:47 +01:00
|
|
|
#include "irc.h"
|
2001-12-22 00:53:16 +01:00
|
|
|
#include "log.h"
|
2001-12-23 22:56:47 +01:00
|
|
|
#include "messages.h"
|
2001-12-29 04:08:19 +01:00
|
|
|
#include "tool.h"
|
2001-12-22 00:53:16 +01:00
|
|
|
|
|
|
|
#include <exp.h>
|
|
|
|
#include "parse.h"
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL VOID Init_Request( REQUEST *Req );
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Parse_Error( CONN_ID Idx, CHAR *Error );
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Validate_Prefix( REQUEST *Req );
|
|
|
|
LOCAL BOOLEAN Validate_Command( REQUEST *Req );
|
|
|
|
LOCAL BOOLEAN Validate_Args( REQUEST *Req );
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Handle_Request( CONN_ID Idx, REQUEST *Req );
|
|
|
|
|
|
|
|
|
|
|
|
GLOBAL VOID Parse_Init( VOID )
|
|
|
|
{
|
|
|
|
} /* Parse_Init */
|
|
|
|
|
|
|
|
|
|
|
|
GLOBAL VOID Parse_Exit( VOID )
|
|
|
|
{
|
|
|
|
} /* Parse_Exit */
|
|
|
|
|
|
|
|
|
|
|
|
GLOBAL BOOLEAN Parse_Request( CONN_ID Idx, CHAR *Request )
|
|
|
|
{
|
2001-12-23 22:56:47 +01:00
|
|
|
/* Client-Request parsen. Bei einem schwerwiegenden Fehler wird
|
|
|
|
* die Verbindung geschlossen und FALSE geliefert.
|
2001-12-22 00:53:16 +01:00
|
|
|
* Der Aufbau gueltiger Requests ist in RFC 2812, 2.3 definiert. */
|
|
|
|
|
|
|
|
REQUEST req;
|
|
|
|
CHAR *start, *ptr;
|
|
|
|
|
|
|
|
assert( Idx >= 0 );
|
|
|
|
assert( Request != NULL );
|
2001-12-23 22:56:47 +01:00
|
|
|
|
2001-12-25 23:04:26 +01:00
|
|
|
#ifdef SNIFFER
|
2002-01-18 12:12:11 +01:00
|
|
|
if( NGIRCd_Sniffer ) Log( LOG_DEBUG, " <- connection %d: '%s'.", Idx, Request );
|
2001-12-23 22:56:47 +01:00
|
|
|
#endif
|
2001-12-22 00:53:16 +01:00
|
|
|
|
|
|
|
Init_Request( &req );
|
|
|
|
|
2001-12-29 04:08:19 +01:00
|
|
|
/* Fuehrendes und folgendes "Geraffel" verwerfen */
|
|
|
|
ngt_TrimStr( Request );
|
|
|
|
|
2001-12-22 00:53:16 +01:00
|
|
|
/* gibt es ein Prefix? */
|
|
|
|
if( Request[0] == ':' )
|
|
|
|
{
|
|
|
|
/* Prefix vorhanden */
|
|
|
|
req.prefix = Request + 1;
|
|
|
|
ptr = strchr( Request, ' ' );
|
2002-01-04 02:20:02 +01:00
|
|
|
if( ! ptr ) return Parse_Error( Idx, "Prefix without command!?" );
|
2001-12-22 00:53:16 +01:00
|
|
|
*ptr = '\0';
|
2002-01-09 02:08:42 +01:00
|
|
|
#ifndef STRICT_RFC
|
|
|
|
/* multiple Leerzeichen als Trenner zwischen
|
|
|
|
* Prefix und Befehl ignorieren */
|
|
|
|
while( *(ptr + 1) == ' ' ) ptr++;
|
|
|
|
#endif
|
2001-12-22 00:53:16 +01:00
|
|
|
start = ptr + 1;
|
|
|
|
}
|
|
|
|
else start = Request;
|
|
|
|
|
|
|
|
if( ! Validate_Prefix( &req )) return Parse_Error( Idx, "Invalid prefix");
|
|
|
|
|
|
|
|
/* Befehl */
|
|
|
|
ptr = strchr( start, ' ' );
|
2002-01-09 02:08:42 +01:00
|
|
|
if( ptr )
|
|
|
|
{
|
|
|
|
*ptr = '\0';
|
|
|
|
#ifndef STRICT_RFC
|
|
|
|
/* multiple Leerzeichen als Trenner vor
|
|
|
|
*Parametertrennern ignorieren */
|
|
|
|
while( *(ptr + 1) == ' ' ) ptr++;
|
|
|
|
#endif
|
|
|
|
}
|
2001-12-22 00:53:16 +01:00
|
|
|
req.command = start;
|
|
|
|
|
|
|
|
if( ! Validate_Command( &req )) return Parse_Error( Idx, "Invalid command" );
|
|
|
|
|
|
|
|
/* Argumente, Parameter */
|
|
|
|
if( ptr )
|
|
|
|
{
|
|
|
|
/* Prinzipiell gibt es welche :-) */
|
|
|
|
start = ptr + 1;
|
|
|
|
while( start )
|
|
|
|
{
|
|
|
|
/* Parameter-String "zerlegen" */
|
2001-12-23 22:56:47 +01:00
|
|
|
if( start[0] == ':' )
|
|
|
|
{
|
|
|
|
req.argv[req.argc] = start + 1;
|
|
|
|
ptr = NULL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
req.argv[req.argc] = start;
|
|
|
|
ptr = strchr( start, ' ' );
|
2002-01-09 02:08:42 +01:00
|
|
|
if( ptr )
|
|
|
|
{
|
|
|
|
*ptr = '\0';
|
|
|
|
#ifndef STRICT_RFC
|
|
|
|
/* multiple Leerzeichen als
|
|
|
|
* Parametertrenner ignorieren */
|
|
|
|
while( *(ptr + 1) == ' ' ) ptr++;
|
|
|
|
#endif
|
|
|
|
}
|
2001-12-23 22:56:47 +01:00
|
|
|
}
|
2001-12-22 00:53:16 +01:00
|
|
|
|
|
|
|
req.argc++;
|
|
|
|
|
|
|
|
if( start[0] == ':' ) break;
|
|
|
|
if( req.argc > 14 ) break;
|
|
|
|
|
|
|
|
if( ptr ) start = ptr + 1;
|
|
|
|
else start = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( ! Validate_Args( &req )) return Parse_Error( Idx, "Invalid argument(s)" );
|
2002-01-03 03:24:49 +01:00
|
|
|
|
2001-12-22 00:53:16 +01:00
|
|
|
return Handle_Request( Idx, &req );
|
|
|
|
} /* Parse_Request */
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL VOID Init_Request( REQUEST *Req )
|
|
|
|
{
|
|
|
|
/* Neue Request-Struktur initialisieren */
|
|
|
|
|
|
|
|
INT i;
|
|
|
|
|
|
|
|
assert( Req != NULL );
|
|
|
|
|
|
|
|
Req->prefix = NULL;
|
|
|
|
Req->command = NULL;
|
|
|
|
for( i = 0; i < 15; Req->argv[i++] = NULL );
|
|
|
|
Req->argc = 0;
|
|
|
|
} /* Init_Request */
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Parse_Error( CONN_ID Idx, CHAR *Error )
|
|
|
|
{
|
|
|
|
/* Fehler beim Parsen. Fehlermeldung an den Client schicken.
|
|
|
|
* TRUE: Connection wurde durch diese Funktion nicht geschlossen,
|
|
|
|
* FALSE: Connection wurde terminiert. */
|
|
|
|
|
|
|
|
assert( Idx >= 0 );
|
|
|
|
assert( Error != NULL );
|
|
|
|
|
2002-01-04 02:20:02 +01:00
|
|
|
Log( LOG_DEBUG, "Connection %d: Parse error: %s", Idx, Error );
|
|
|
|
return Conn_WriteStr( Idx, "ERROR :Parse error: %s", Error );
|
2001-12-22 00:53:16 +01:00
|
|
|
} /* Parse_Error */
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Validate_Prefix( REQUEST *Req )
|
|
|
|
{
|
|
|
|
assert( Req != NULL );
|
|
|
|
return TRUE;
|
|
|
|
} /* Validate_Prefix */
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Validate_Command( REQUEST *Req )
|
|
|
|
{
|
|
|
|
assert( Req != NULL );
|
|
|
|
return TRUE;
|
|
|
|
} /* Validate_Comman */
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Validate_Args( REQUEST *Req )
|
|
|
|
{
|
|
|
|
assert( Req != NULL );
|
|
|
|
return TRUE;
|
|
|
|
} /* Validate_Args */
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL BOOLEAN Handle_Request( CONN_ID Idx, REQUEST *Req )
|
|
|
|
{
|
2001-12-23 22:56:47 +01:00
|
|
|
/* Client-Request verarbeiten. Bei einem schwerwiegenden Fehler
|
|
|
|
* wird die Verbindung geschlossen und FALSE geliefert. */
|
|
|
|
|
2002-01-06 00:23:20 +01:00
|
|
|
CLIENT *client, *target, *prefix;
|
|
|
|
CHAR str[LINE_LEN];
|
|
|
|
INT i;
|
2001-12-23 22:56:47 +01:00
|
|
|
|
2001-12-22 00:53:16 +01:00
|
|
|
assert( Idx >= 0 );
|
|
|
|
assert( Req != NULL );
|
|
|
|
assert( Req->command != NULL );
|
|
|
|
|
2001-12-23 22:56:47 +01:00
|
|
|
client = Client_GetFromConn( Idx );
|
|
|
|
assert( client != NULL );
|
|
|
|
|
2002-01-06 00:23:20 +01:00
|
|
|
/* Statuscode, der geforwarded werden muss? */
|
|
|
|
if(( strlen( Req->command ) == 3 ) && ( atoi( Req->command ) > 100 ))
|
|
|
|
{
|
|
|
|
/* Befehl ist ein Statuscode */
|
|
|
|
|
|
|
|
/* Zielserver ermitteln */
|
|
|
|
if(( Client_Type( client ) == CLIENT_SERVER ) && ( Req->argc > 0 )) target = Client_GetFromID( Req->argv[0] );
|
|
|
|
else target = NULL;
|
2002-01-07 16:29:11 +01:00
|
|
|
if( ! target )
|
|
|
|
{
|
|
|
|
if( target ) Log( LOG_WARNING, "Unknown target for status code: \"%s\"", Req->argv[0] );
|
|
|
|
else Log( LOG_WARNING, "Unknown target for status code!" );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
if( target == Client_ThisServer( ))
|
|
|
|
{
|
|
|
|
Log( LOG_DEBUG, "Ignored status code %s from \"%s\".", Req->command, Client_ID( client ));
|
|
|
|
return TRUE;
|
|
|
|
}
|
2002-01-06 00:23:20 +01:00
|
|
|
|
|
|
|
/* Quell-Client ermitteln */
|
2002-01-07 16:29:11 +01:00
|
|
|
if( ! Req->prefix[0] )
|
|
|
|
{
|
|
|
|
Log( LOG_WARNING, "Got status code without prefix!?" );
|
|
|
|
return TRUE;
|
|
|
|
}
|
2002-01-06 00:23:20 +01:00
|
|
|
else prefix = Client_GetFromID( Req->prefix );
|
2002-01-07 16:29:11 +01:00
|
|
|
if( ! prefix )
|
|
|
|
{
|
|
|
|
Log( LOG_WARNING, "Got status code from unknown source: \"%s\"", Req->prefix );
|
|
|
|
return TRUE;
|
|
|
|
}
|
2002-01-06 00:23:20 +01:00
|
|
|
|
|
|
|
/* Statuscode weiterleiten */
|
|
|
|
strcpy( str, Req->command );
|
|
|
|
for( i = 0; i < Req->argc; i++ )
|
|
|
|
{
|
|
|
|
if( i < Req->argc - 1 ) strcat( str, " " );
|
|
|
|
else strcat( str, " :" );
|
|
|
|
strcat( str, Req->argv[i] );
|
|
|
|
}
|
|
|
|
return IRC_WriteStrClientPrefix( target, prefix, str );
|
|
|
|
}
|
|
|
|
|
2001-12-25 20:18:36 +01:00
|
|
|
if( strcasecmp( Req->command, "PASS" ) == 0 ) return IRC_PASS( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "NICK" ) == 0 ) return IRC_NICK( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "USER" ) == 0 ) return IRC_USER( client, Req );
|
2002-01-03 03:24:49 +01:00
|
|
|
else if( strcasecmp( Req->command, "SERVER" ) == 0 ) return IRC_SERVER( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "NJOIN" ) == 0 ) return IRC_NJOIN( client, Req );
|
2001-12-25 23:04:26 +01:00
|
|
|
else if( strcasecmp( Req->command, "QUIT" ) == 0 ) return IRC_QUIT( client, Req );
|
2002-01-04 18:56:45 +01:00
|
|
|
else if( strcasecmp( Req->command, "SQUIT" ) == 0 ) return IRC_SQUIT( client, Req );
|
2001-12-26 04:23:03 +01:00
|
|
|
else if( strcasecmp( Req->command, "PING" ) == 0 ) return IRC_PING( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "PONG" ) == 0 ) return IRC_PONG( client, Req );
|
2001-12-25 20:18:36 +01:00
|
|
|
else if( strcasecmp( Req->command, "MOTD" ) == 0 ) return IRC_MOTD( client, Req );
|
2001-12-27 20:13:21 +01:00
|
|
|
else if( strcasecmp( Req->command, "PRIVMSG" ) == 0 ) return IRC_PRIVMSG( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "NOTICE" ) == 0 ) return IRC_NOTICE( client, Req );
|
2001-12-29 04:08:19 +01:00
|
|
|
else if( strcasecmp( Req->command, "MODE" ) == 0 ) return IRC_MODE( client, Req );
|
2001-12-31 16:33:13 +01:00
|
|
|
else if( strcasecmp( Req->command, "NAMES" ) == 0 ) return IRC_NAMES( client, Req );
|
2001-12-31 03:18:51 +01:00
|
|
|
else if( strcasecmp( Req->command, "ISON" ) == 0 ) return IRC_ISON( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "WHOIS" ) == 0 ) return IRC_WHOIS( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "USERHOST" ) == 0 ) return IRC_USERHOST( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "OPER" ) == 0 ) return IRC_OPER( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "DIE" ) == 0 ) return IRC_DIE( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "RESTART" ) == 0 ) return IRC_RESTART( client, Req );
|
2002-01-02 03:43:22 +01:00
|
|
|
else if( strcasecmp( Req->command, "ERROR" ) == 0 ) return IRC_ERROR( client, Req );
|
2002-01-12 00:50:55 +01:00
|
|
|
else if( strcasecmp( Req->command, "LUSERS" ) == 0 ) return IRC_LUSERS( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "LINKS" ) == 0 ) return IRC_LINKS( client, Req );
|
2002-01-21 01:01:37 +01:00
|
|
|
else if( strcasecmp( Req->command, "JOIN" ) == 0 ) return IRC_JOIN( client, Req );
|
|
|
|
else if( strcasecmp( Req->command, "PART" ) == 0 ) return IRC_PART( client, Req );
|
2001-12-27 20:13:21 +01:00
|
|
|
|
2001-12-23 22:56:47 +01:00
|
|
|
/* Unbekannter Befehl */
|
2002-01-06 18:41:44 +01:00
|
|
|
if( Client_Type( client ) != CLIENT_SERVER ) IRC_WriteStrClient( client, ERR_UNKNOWNCOMMAND_MSG, Client_ID( client ), Req->command );
|
2002-01-05 02:42:08 +01:00
|
|
|
Log( LOG_DEBUG, "Connection %d: Unknown command \"%s\", %d %s,%s prefix.", Client_Conn( client ), Req->command, Req->argc, Req->argc == 1 ? "parameter" : "parameters", Req->prefix ? "" : " no" );
|
2001-12-23 22:56:47 +01:00
|
|
|
|
2001-12-22 00:53:16 +01:00
|
|
|
return TRUE;
|
|
|
|
} /* Handle_Request */
|
|
|
|
|
|
|
|
|
|
|
|
/* -eof- */
|