]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-login.c
- der System-Typ wird nun wieder korrekt ermittelt und verwendet.
[ngircd-alex.git] / src / ngircd / irc-login.c
index 61c016369d266cadeed932bea4f9204da0bf12d2..5333570fe0ea7311520564dbb93e463bec8ffa66 100644 (file)
@@ -9,27 +9,15 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-login.c,v 1.3 2002/03/03 17:15:11 alex Exp $
+ * $Id: irc-login.c,v 1.8 2002/03/12 14:37:52 alex Exp $
  *
  * irc-login.c: Anmeldung und Abmeldung im IRC
- *
- * $Log: irc-login.c,v $
- * Revision 1.3  2002/03/03 17:15:11  alex
- * - Source in weitere Module fuer IRC-Befehle aufgesplitted.
- *
- * Revision 1.2  2002/03/02 00:49:11  alex
- * - Bei der USER-Registrierung wird NICK nicht mehr sofort geforwarded,
- *   sondern erst dann, wenn auch ein gueltiges USER empfangen wurde.
- *
- * Revision 1.1  2002/02/27 23:26:21  alex
- * - Modul aus irc.c bzw. irc.h ausgegliedert.
  */
 
 
-#include <portab.h>
-#include "global.h"
+#include "portab.h"
 
-#include <imp.h>
+#include "imp.h"
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -42,7 +30,7 @@
 #include "log.h"
 #include "messages.h"
 
-#include <exp.h>
+#include "exp.h"
 #include "irc-login.h"
 
 
@@ -277,12 +265,13 @@ GLOBAL BOOLEAN IRC_QUIT( CLIENT *Client, REQUEST *Req )
                target = Client_Search( Req->prefix );
                if( ! target )
                {
-                       Log( LOG_ERR, "Got QUIT from %s for unknown client!?", Client_ID( Client ));
+                       /* Den Client kennen wir nicht (mehr), also nichts zu tun. */
+                       Log( LOG_WARNING, "Got QUIT from %s for unknown client!?", Client_ID( Client ));
                        return CONNECTED;
                }
 
-               if( Req->argc == 0 ) Client_Destroy( target, "Got QUIT command.", NULL );
-               else Client_Destroy( target, "Got QUIT command.", Req->argv[0] );
+               if( Req->argc == 0 ) Client_Destroy( target, "Got QUIT command.", NULL, TRUE );
+               else Client_Destroy( target, "Got QUIT command.", Req->argv[0], TRUE );
 
                return CONNECTED;
        }
@@ -301,9 +290,11 @@ GLOBAL BOOLEAN IRC_PING( CLIENT *Client, REQUEST *Req )
 
        /* Falsche Anzahl Parameter? */
        if( Req->argc < 1 ) return IRC_WriteStrClient( Client, ERR_NOORIGIN_MSG, Client_ID( Client ));
+#ifdef STRICT_RFC
        if( Req->argc > 2 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+#endif
 
-       if( Req->argc == 2 )
+       if( Req->argc > 1 )
        {
                /* es wurde ein Ziel-Client angegeben */
                target = Client_GetFromID( Req->argv[1] );