From d2a1f6aa4be7e42dd76e5342b309b8331d86bab4 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 31 Dec 2012 21:03:23 +0100 Subject: Document "HelpFile" in sample-ngircd.conf and ngircd.conf.5 --- doc/sample-ngircd.conf.tmpl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl index 997a983d..3f80a9f9 100644 --- a/doc/sample-ngircd.conf.tmpl +++ b/doc/sample-ngircd.conf.tmpl @@ -33,6 +33,10 @@ ;AdminInfo2 = Location ;AdminEMail = admin@irc.server + # Text file which contains the ngIRCd help text. This file is required + # to display help texts when using the "HELP " command. + ;HelpFile = :ETCDIR:/ngircd.help + # Info text of the server. This will be shown by WHOIS and # LINKS requests for example. Info = Server Info Text -- cgit 1.4.1 From 8ec09e3ca47a8d2ca0502831d77f7edc8c4749a6 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 1 Jan 2013 15:09:09 +0100 Subject: Add doc/Commands.txt which should document all commands This document can be used as "help text", too, see configuration option "HelpFile" in ngircd.conf(5). Please note that this file in its current state is far from complete, only a few commands are documented, but you should get an idea how it works. So please send in patches adding the remaining parts! :-) --- doc/Commands.txt | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/Makefile.am | 1 + 2 files changed, 220 insertions(+) create mode 100644 doc/Commands.txt (limited to 'doc') diff --git a/doc/Commands.txt b/doc/Commands.txt new file mode 100644 index 00000000..e9b78731 --- /dev/null +++ b/doc/Commands.txt @@ -0,0 +1,219 @@ + + ngIRCd - Next Generation IRC Server + http://ngircd.barton.de/ + + (c)2001-2013 Alexander Barton and Contributors. + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- Commands.txt -- + + +This file lists all commands available on ngIRCd. It is written in a format +that is human readable as well as machine parseable and therefore can be used +as "help text file" of the daemon. + +In short, the HELP command parses this file as following when a user user +issues a "HELP " command: + + 1. Search the file for a line "- ", + 2. Output all subsequent lines that start with a TAB (ASCII 9) character + to the client using NOTICE commands, treat lines containing a single "." + after the TAB as empty lines. + 3. Break at the first line not starting with a TAB character. + +This format allows to have information to each command stored in this file +which will not be sent to an IRC user requesting help which enables us to +have additional annotations stored here which further describe the origin, +implementation details, or limits of the specific command. + +A special "Intro" block is returned to the user when the HELP command is +used without a command name: + + +- Intro + This is ngIRCd, a server software for Internet Relay Chat (IRC) + networks. You can find more information about ngIRCd on its homepage: + + . + Use "HELP COMMANDS" to get a list of all available commands and + "HELP " to get help for a specific IRC command, for + example "HELP quit" or "HELP privmsg". + + +General Commands +~~~~~~~~~~~~~~~~ + +- AWAY + +- CAP + +- CHARCONV + +- HELP + HELP [] + . + Show help information for a specific IRC . The name + is case-insensitive. + . + Use the command "HELP Commands" to get a list of all available commands. + + The HELP command isn't specified by any RFC but implemented by most + daemons. If no help text could be read in, ngIRCd outputs a list of all + implemented commands when receiving a plain "HELP" command as well as + on "HELP Commands". + + ngIRCd replies using "NOTICE" commands like ircd 2.10/2.11; other + implementations are using numerics 704, 705, and 706. + + +- MODE + +- NICK + +- NOTICE + +- PASS + +- PING + +- PONG + +- PRIVMSG + +- QUIT + QUIT [] + . + End IRC session and disconnect from the server. + . + If a has been given, it is displayed to all the + channels that you are a member of when leaving. + +- USER + +- WALLOPS + +- WEBIRC + + +Status and Informational Commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- INFO + +- ISON + +- LINKS + +- LUSERS + +- METADATA + +- MOTD + +- NAMES + +- STATS + +- TIME + +- TRACE + +- USERHOST + +- VERSION + +- WHO + +- WHOIS + +- WHOWAS + + +Channel Commands +~~~~~~~~~~~~~~~~ + +- INVITE + +- JOIN + +- KICK + +- LIST + +- PART + +- TOPIC + + +Administrative Commands +~~~~~~~~~~~~~~~~~~~~~~~ + +- ADMIN + ADMIN [] + . + Show administartive information about an IRC server in the network. + If no server name has been given, the local server will respond. + +- CONNECT + +- DIE + +- DISCONNECT + +- GLINE + +- KILL + +- KLINE + +- OPER + +- REHASH + +- RESTART + + +IRC Service Commands +~~~~~~~~~~~~~~~~~~~~~~~~ + +- SERVICE + +- SERVLIST + +- SQUERY + +- SVSNICK + + +Server Protocol Commands +~~~~~~~~~~~~~~~~~~~~~~~~ + +- CHANINFO + +- ERROR + ERROR [ [<> [...]]] + . + Return an error message to the server. The first parameter, if given, + will be logged by the server, all further parameters are silently + ignored. + . + This command is silently ignored on non-server and non-service links. + +- NJOIN + +- SERVER + +- SQUIT + + +Dummy Commands +~~~~~~~~~~~~~~ + +- SUMMON + +- USERS + +- GET + +- POST diff --git a/doc/Makefile.am b/doc/Makefile.am index 2b9b3aab..eb6fa937 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -19,6 +19,7 @@ SUFFIXES = .tmpl static_docs = \ Bopm.txt \ Capabilities.txt \ + Commands.txt \ Contributing.txt \ FAQ.txt \ GIT.txt \ -- cgit 1.4.1 From 950aeec3ff0e15c456ac32d8fecee8c73f7c5df3 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 1 Jan 2013 19:25:06 +0100 Subject: Use "${docdir}/Commands.txt" as help text file --- configure.ng | 4 ++-- contrib/MacOSX/config.h | 3 ++- doc/Makefile.am | 3 ++- doc/sample-ngircd.conf.tmpl | 2 +- src/ngircd/conf.c | 4 ++-- src/ngircd/defines.h | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/configure.ng b/configure.ng index 84e27508..732e55ee 100644 --- a/configure.ng +++ b/configure.ng @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors +# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -110,7 +110,7 @@ esac # Add additional CFLAGS, eventually specified on the command line: test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD" -CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'" +CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"' -DDOCDIR='\"\$(docdir)\"'" # -- Headers -- diff --git a/contrib/MacOSX/config.h b/contrib/MacOSX/config.h index 6da74962..f4838276 100644 --- a/contrib/MacOSX/config.h +++ b/contrib/MacOSX/config.h @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ #define VERSION "??("__DATE__")" #endif #define SYSCONFDIR "/etc/ngircd" +#define DOCDIR "/usr/share/doc/ngircd" #ifndef TARGET_VENDOR #define TARGET_VENDOR "apple" diff --git a/doc/Makefile.am b/doc/Makefile.am index eb6fa937..04f74b60 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors +# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,6 +12,7 @@ .tmpl: $(AM_V_GEN)sed \ -e "s@:ETCDIR:@${sysconfdir}@" \ + -e "s@:DOCDIR:@${docdir}@" \ <$< >$@ SUFFIXES = .tmpl diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl index 3f80a9f9..1c3998ad 100644 --- a/doc/sample-ngircd.conf.tmpl +++ b/doc/sample-ngircd.conf.tmpl @@ -35,7 +35,7 @@ # Text file which contains the ngIRCd help text. This file is required # to display help texts when using the "HELP " command. - ;HelpFile = :ETCDIR:/ngircd.help + ;HelpFile = :DOCDIR:/Commands.txt # Info text of the server. This will be shown by WHOIS and # LINKS requests for example. diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index fa1bfba1..d5a28bd7 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -706,7 +706,7 @@ Set_Defaults(bool InitServers) array_free(&Conf_Helptext); strlcpy(Conf_MotdFile, SYSCONFDIR, sizeof(Conf_MotdFile)); strlcat(Conf_MotdFile, MOTD_FILE, sizeof(Conf_MotdFile)); - strlcpy(Conf_HelpFile, SYSCONFDIR, sizeof(Conf_HelpFile)); + strlcpy(Conf_HelpFile, DOCDIR, sizeof(Conf_HelpFile)); strlcat(Conf_HelpFile, HELP_FILE, sizeof(Conf_HelpFile)); strcpy(Conf_ServerPwd, ""); strlcpy(Conf_PidFile, PID_FILE, sizeof(Conf_PidFile)); diff --git a/src/ngircd/defines.h b/src/ngircd/defines.h index 28a260b8..3850b581 100644 --- a/src/ngircd/defines.h +++ b/src/ngircd/defines.h @@ -78,7 +78,7 @@ #define MOTD_FILE "/ngircd.motd" /** Name of the help file. */ -#define HELP_FILE "/ngircd.help" +#define HELP_FILE "/Commands.txt" /** Default chroot() directory. */ #define CHROOT_DIR "" -- cgit 1.4.1