about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2001-12-25 19:18:36 +0000
committerAlexander Barton <alex@barton.de>2001-12-25 19:18:36 +0000
commitcfd78b90acb6637ac9b296d7091a511caa40201f (patch)
treea6807212441dfb73e229db3859b65162446b60ae /src
parenteb952e35ccf28aa4d60a944d5cb179025624fc46 (diff)
downloadngircd-cfd78b90acb6637ac9b296d7091a511caa40201f.tar.gz
ngircd-cfd78b90acb6637ac9b296d7091a511caa40201f.zip
- Gross- und Kleinschreibung der IRC-Befehle wird ignoriert.
- bessere Debug-Ausgaben.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/parse.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c
index cd3d95d4..7204b3aa 100644
--- a/src/ngircd/parse.c
+++ b/src/ngircd/parse.c
@@ -9,11 +9,15 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: parse.c,v 1.2 2001/12/23 21:56:47 alex Exp $
+ * $Id: parse.c,v 1.3 2001/12/25 19:18:36 alex Exp $
  *
  * parse.c: Parsen der Client-Anfragen
  *
  * $Log: parse.c,v $
+ * Revision 1.3  2001/12/25 19:18:36  alex
+ * - Gross- und Kleinschreibung der IRC-Befehle wird ignoriert.
+ * - bessere Debug-Ausgaben.
+ *
  * Revision 1.2  2001/12/23 21:56:47  alex
  * - bessere Debug-Ausgaben,
  * - Bug im Parameter-Parser behoben (bei "langem" Parameter)
@@ -208,13 +212,18 @@ LOCAL BOOLEAN Handle_Request( CONN_ID Idx, REQUEST *Req )
 	client = Client_GetFromConn( Idx );
 	assert( client != NULL );
 
-	if( strcmp( Req->command, "PASS" ) == 0 ) return IRC_PASS( client, Req );
-	else if( strcmp( Req->command, "NICK" ) == 0 ) return IRC_NICK( client, Req );
-	else if( strcmp( Req->command, "USER" ) == 0 ) return IRC_USER( client, Req );
+	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 );
+	else if( strcasecmp( Req->command, "MOTD" ) == 0 ) return IRC_MOTD( client, Req );
 
 	/* Unbekannter Befehl */
 	Conn_WriteStr( Idx, ERR_UNKNOWNCOMMAND_MSG, Req->command );
 
+#ifndef DEBUG
+	Log( LOG_DEBUG, "Connection %d: Unknown command '%s', %d %s,%s prefix.", Idx, Req->command, Req->argc, Req->argc == 1 ? "parameter" : "parameters", Req->prefix ? "" : " no" );
+#endif
+
 	return TRUE;
 } /* Handle_Request */