summary refs log tree commit diff
path: root/src/ngircd/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngircd/irc.c')
-rw-r--r--src/ngircd/irc.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index 7cdb4dad..98ee042e 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -14,7 +14,7 @@
 
 #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 <assert.h>
@@ -226,4 +226,25 @@ IRC_TRACE( CLIENT *Client, REQUEST *Req )
 } /* 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- */