mirror of
https://github.com/osmarks/ngircd.git
synced 2025-02-05 20:00:02 +00:00
- Added "HELP" command.
This commit is contained in:
parent
28cd2c1191
commit
2152e37722
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: irc.c,v 1.117 2003/01/13 18:56:30 alex Exp $";
|
static char UNUSED id[] = "$Id: irc.c,v 1.118 2003/01/15 13:49:20 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -226,4 +226,25 @@ IRC_TRACE( CLIENT *Client, REQUEST *Req )
|
|||||||
} /* IRC_TRACE */
|
} /* IRC_TRACE */
|
||||||
|
|
||||||
|
|
||||||
|
GLOBAL BOOLEAN
|
||||||
|
IRC_HELP( CLIENT *Client, REQUEST *Req )
|
||||||
|
{
|
||||||
|
COMMAND *cmd;
|
||||||
|
|
||||||
|
assert( Client != NULL );
|
||||||
|
assert( Req != NULL );
|
||||||
|
|
||||||
|
/* Bad number of arguments? */
|
||||||
|
if( Req->argc > 0 ) return IRC_WriteStrClient( Client, ERR_NORECIPIENT_MSG, Client_ID( Client ), Req->command );
|
||||||
|
|
||||||
|
cmd = Parse_GetCommandStruct( );
|
||||||
|
while( cmd->name )
|
||||||
|
{
|
||||||
|
if( ! IRC_WriteStrClient( Client, "NOTICE %s :%s", Client_ID( Client ), cmd->name )) return DISCONNECTED;
|
||||||
|
cmd++;
|
||||||
|
}
|
||||||
|
return CONNECTED;
|
||||||
|
} /* IRC_HELP */
|
||||||
|
|
||||||
|
|
||||||
/* -eof- */
|
/* -eof- */
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
* Please read the file COPYING, README and AUTHORS for more information.
|
* Please read the file COPYING, README and AUTHORS for more information.
|
||||||
*
|
*
|
||||||
* $Id: irc.h,v 1.37 2003/01/13 18:56:30 alex Exp $
|
* $Id: irc.h,v 1.38 2003/01/15 13:49:20 alex Exp $
|
||||||
*
|
*
|
||||||
* IRC commands (header)
|
* IRC commands (header)
|
||||||
*/
|
*/
|
||||||
@ -23,6 +23,7 @@ GLOBAL BOOLEAN IRC_KILL PARAMS(( CLIENT *Client, REQUEST *Req ));
|
|||||||
GLOBAL BOOLEAN IRC_NOTICE PARAMS(( CLIENT *Client, REQUEST *Req ));
|
GLOBAL BOOLEAN IRC_NOTICE PARAMS(( CLIENT *Client, REQUEST *Req ));
|
||||||
GLOBAL BOOLEAN IRC_PRIVMSG PARAMS(( CLIENT *Client, REQUEST *Req ));
|
GLOBAL BOOLEAN IRC_PRIVMSG PARAMS(( CLIENT *Client, REQUEST *Req ));
|
||||||
GLOBAL BOOLEAN IRC_TRACE PARAMS(( CLIENT *Client, REQUEST *Req ));
|
GLOBAL BOOLEAN IRC_TRACE PARAMS(( CLIENT *Client, REQUEST *Req ));
|
||||||
|
GLOBAL BOOLEAN IRC_HELP PARAMS(( CLIENT *Client, REQUEST *Req ));
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: parse.c,v 1.58 2003/01/13 18:56:30 alex Exp $";
|
static char UNUSED id[] = "$Id: parse.c,v 1.59 2003/01/15 13:49:20 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -56,6 +56,7 @@ COMMAND My_Commands[] =
|
|||||||
{ "DIE", IRC_DIE, CLIENT_USER, 0, 0, 0 },
|
{ "DIE", IRC_DIE, CLIENT_USER, 0, 0, 0 },
|
||||||
{ "DISCONNECT", IRC_DISCONNECT, CLIENT_USER, 0, 0, 0 },
|
{ "DISCONNECT", IRC_DISCONNECT, CLIENT_USER, 0, 0, 0 },
|
||||||
{ "ERROR", IRC_ERROR, 0xFFFF, 0, 0, 0 },
|
{ "ERROR", IRC_ERROR, 0xFFFF, 0, 0, 0 },
|
||||||
|
{ "HELP", IRC_HELP, CLIENT_USER, 0, 0, 0 },
|
||||||
{ "INVITE", IRC_INVITE, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
|
{ "INVITE", IRC_INVITE, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
|
||||||
{ "ISON", IRC_ISON, CLIENT_USER, 0, 0, 0 },
|
{ "ISON", IRC_ISON, CLIENT_USER, 0, 0, 0 },
|
||||||
{ "JOIN", IRC_JOIN, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
|
{ "JOIN", IRC_JOIN, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user