]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/parse.c
- New command DISCONNECT.
[ngircd-alex.git] / src / ngircd / parse.c
index 3be66a9e8859a9a69cdd541f86ffce626c88b1dc..0c58e10d934e06d237292924378a87213820846b 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: parse.c,v 1.53 2002/12/26 16:48:14 alex Exp $";
+static char UNUSED id[] = "$Id: parse.c,v 1.56 2002/12/31 16:11:24 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -24,7 +24,7 @@ static char UNUSED id[] = "$Id: parse.c,v 1.53 2002/12/26 16:48:14 alex Exp $";
 
 #include "ngircd.h"
 #include "defines.h"
-#include "conn.h"
+#include "conn-func.h"
 #include "client.h"
 #include "channel.h"
 #include "log.h"
@@ -54,6 +54,7 @@ COMMAND My_Commands[] =
        { "AWAY", IRC_AWAY, CLIENT_USER, 0, 0, 0 },
        { "CONNECT", IRC_CONNECT, CLIENT_USER, 0, 0, 0 },
        { "DIE", IRC_DIE, CLIENT_USER, 0, 0, 0 },
+       { "DISCONNECT", IRC_DISCONNECT, CLIENT_USER, 0, 0, 0 },
        { "ERROR", IRC_ERROR, 0xFFFF, 0, 0, 0 },
        { "INVITE", IRC_INVITE, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "ISON", IRC_ISON, CLIENT_USER, 0, 0, 0 },
@@ -360,7 +361,7 @@ Handle_Request( CONN_ID Idx, REQUEST *Req )
                }
 
                /* Statuscode weiterleiten */
-               strcpy( str, Req->command );
+               strlcpy( str, Req->command, sizeof( str ));
                for( i = 0; i < Req->argc; i++ )
                {
                        if( i < Req->argc - 1 ) strlcat( str, " ", sizeof( str ));