? wzd_init_lex.tmp.c Index: wzd_ClientThread.c =================================================================== RCS file: /cvsroot/wzdftpd/src/wzd_ClientThread.c,v retrieving revision 1.136 diff -u -r1.136 wzd_ClientThread.c --- wzd_ClientThread.c 8 Feb 2005 17:04:13 -0000 1.136 +++ wzd_ClientThread.c 10 Feb 2005 19:57:02 -0000 @@ -104,6 +104,7 @@ /* TODO order the following by probability order */ if (length <= 4) { switch ( STRTOINT(token[0],token[1],token[2],token[3]) ) { + case STRTOINT('h','e','l','p'): return TOK_HELP; case STRTOINT('u','s','e','r'): return TOK_USER; case STRTOINT('p','a','s','s'): return TOK_PASS; case STRTOINT('a','u','t','h'): return TOK_AUTH; @@ -3115,6 +3116,15 @@ return E_OK; } +/*************** do_help *****************************/ +int do_help(wzd_string_t *name, wzd_string_t *arg, wzd_context_t * context) +{ + /* TODO maybe add HELP SITE? */ + send_message_with_args(214,context); + + return E_OK; +} + /*************** do_user_ip **************************/ int do_user_ip(const char *username, wzd_context_t * context) Index: wzd_ClientThread.h =================================================================== RCS file: /cvsroot/wzdftpd/src/wzd_ClientThread.h,v retrieving revision 1.19 diff -u -r1.19 wzd_ClientThread.h --- wzd_ClientThread.h 31 Jan 2005 15:37:00 -0000 1.19 +++ wzd_ClientThread.h 10 Feb 2005 19:57:02 -0000 @@ -85,5 +85,6 @@ int do_quit(wzd_string_t *name, wzd_string_t *param, wzd_context_t * context); int do_prot(wzd_string_t *name, wzd_string_t *param, wzd_context_t * context); int do_sscn(wzd_string_t *name, wzd_string_t *param, wzd_context_t * context); +int do_help(wzd_string_t *name, wzd_string_t *param, wzd_context_t * context); #endif /* __WZD_CLIENT_THREAD__ */ Index: wzd_action.h =================================================================== RCS file: /cvsroot/wzdftpd/src/wzd_action.h,v retrieving revision 1.18 diff -u -r1.18 wzd_action.h --- wzd_action.h 31 Jan 2005 15:37:00 -0000 1.18 +++ wzd_action.h 10 Feb 2005 19:57:02 -0000 @@ -27,6 +27,7 @@ typedef enum { TOK_UNKNOWN=0, + TOK_HELP, TOK_USER, TOK_PASS, TOK_AUTH, Index: wzd_commands.c =================================================================== RCS file: /cvsroot/wzdftpd/src/wzd_commands.c,v retrieving revision 1.4 diff -u -r1.4 wzd_commands.c --- wzd_commands.c 31 Jan 2005 15:37:00 -0000 1.4 +++ wzd_commands.c 10 Feb 2005 19:57:02 -0000 @@ -151,6 +151,7 @@ if (commands_add("xcrc",do_xcrc,NULL,TOK_XCRC)) return -1; if (commands_add("xmd5",do_xmd5,NULL,TOK_XMD5)) return -1; if (commands_add("opts",do_opts,NULL,TOK_OPTS)) return -1; + if (commands_add("help",do_help,NULL,TOK_HELP)) return -1; if (commands_add("quit",do_quit,NULL,TOK_QUIT)) return -1; #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) if (commands_add("prot",do_prot,NULL,TOK_PROT)) return -1; Index: wzd_messages.c =================================================================== RCS file: /cvsroot/wzdftpd/src/wzd_messages.c,v retrieving revision 1.35 diff -u -r1.35 wzd_messages.c --- wzd_messages.c 10 Dec 2004 15:04:38 -0000 1.35 +++ wzd_messages.c 10 Feb 2005 19:57:02 -0000 @@ -71,6 +71,11 @@ msg_tab[202] = strdup("Command not implemented."); msg_tab[211] = strdup("%s"); msg_tab[213] = strdup("%s"); /* mdtm */ + msg_tab[214] = strdup("The following commands can be used:\n" + "SITE TYPE PORT PASV EPRT EPSV ABOR PWD ALLO FEAT NOOP\n" + "SYST RNFR RNTO CWD LIST STAT MKD RMD RETR STOR REST\n" + "MDTM SIZE DELE PRET XCRC XMD5 OPTS HELP QUIT\n" + "Help OK"); /* TODO sort */ msg_tab[215] = strdup("UNIX Type: L8"); msg_tab[220] = strdup("wzd server ready."); msg_tab[221] = strdup("Cya !");