Commit Graph

2881 Commits

Author SHA1 Message Date
Alexander Barton a7023113e7 Commands.txt: Update description of the "LUSERS" command 2013-02-10 00:20:19 +01:00
Alexander Barton 02e24f5d1e Commands.txt: Update description of the "LINKS" command 2013-02-10 00:19:59 +01:00
Alexander Barton 13740c1bf4 Commands.txt: Update description of the "ISON" command 2013-02-10 00:19:41 +01:00
Alexander Barton 8212b730c7 Commands.txt: Update description of the "INFO" command 2013-02-10 00:19:20 +01:00
Alexander Barton a4daa613ae Commands.txt: Update description of the "ADMIN" command 2013-02-10 00:18:43 +01:00
Alexander Barton b7690a0add Commands.txt: Add description for the "CHARCONV" command 2013-02-03 19:02:42 +01:00
Alexander Barton 18ecc2fd81 Commands.txt: Add description for the "CAP" command 2013-02-03 18:59:44 +01:00
Alexander Barton 73fded7515 Commands.txt: Import descriptions from "rbose/command_help"
Import command description texts from the "rbose/command_help" branch,
which have been written by DNS <dns@rbose.org> -- thanks a lot!
2013-01-23 15:16:33 +01:00
Alexander Barton 7630e8ffc6 Commands.txt: Reorder some commands
Reorder some commands and introduce new section "Connection Handling".
Idea by DNS <dns@rbose.org>, thanks!
2013-01-23 15:02:46 +01:00
Alexander Barton 4552ad5269 Commands.txt: Fix some wording and spelling 2013-01-23 14:51:19 +01:00
Alexander Barton 3d49e8ac84 ngircd.service: Use "forking" service type
Don't run ngIRCd in forground mode but let it daemonize itself. This
enhances the log output of "systemctl status ngircd.service", because
now ngIRCd doesn't print out its PID and timestamp on each log message
which is redundant: it becomes logged by systemd/journald already.
2013-01-23 00:44:16 +01:00
Alexander Barton 508ca3044d Return better "Connection not registered as server link" errors
Now ngIRCd returns a more specific error message for numeric
ERR_NOTREGISTERED(451) when a regular user tries to use a command that
isn't allowed for users but for servers: ERR_NOTREGISTEREDSERVER(451).
2013-01-22 10:54:06 +01:00
Alexander Barton d8f2964710 MODE: don't report error on "more modes than parameters"
Don't report ERR_NEEDMOREPARAMS(461) when a MDOE command with more modes
than nicknames is handled, as well as for channel limit and key changes
without specifying the limit or key parameters.

This is how a lot (all?) other IRC servers behave, including ircd2.11,
InspIRCd, and ircd-seven. And because of clients (tested with Textual and
mIRC) sending bogus MODE commands like "MODE -ooo nick", end-users got the
expected result as well as correct but misleading error messages ...

If ngIRCd is compiled using "strict mode", these errors are still reported.

Reported-by: Tim <tim@stackwatch.net>
2013-01-13 17:18:04 +01:00
Alexander Barton ab00997698 Correctly detect when SSL subsystem must be initialized
This patch introduces the new function Conf_SSLInUse() to check when the
current server configuration requires the SSL subsystem to be initialized
and accounts incoming as well as outgoing connections -- so this fixes
commit bb20aeb9 ("Initialize SSL when needed only, and disable SSL on
errors") which only handled the inbound case  ...

Tested-by: Brett Smith <brett@w3.org>
2013-01-07 20:34:55 +01:00
Alexander Barton b4966aa1bd configure: use AS_HELP_STRING for --with-iconv 2013-01-06 17:46:06 +01:00
Alexander Barton 0703fcd719 autogen.sh: Enforce serial test harness on automake >=1.13 2013-01-05 03:05:56 +01:00
Alexander Barton 4594583f52 autogen.sh: Reformat messages. 2013-01-05 02:39:06 +01:00
Alexander Barton 68cb1a8c2e Merge branch 'bug145-ProvideHelp'
* bug145-ProvideHelp:
  Use "${docdir}/Commands.txt" as help text file
  Add a note that "help file" is updated on startup and REHASH only
  Add doc/Commands.txt which should document all commands
  Implement Help() function parsing and returning the help text
  Document "HelpFile" in sample-ngircd.conf and ngircd.conf.5
  Implement new configuration option "HelpFile"
  IRC_HELP(): Code cleanup
  Refactor Read_Motd() into Read_TextFile()
2013-01-02 23:41:46 +01:00
Alexander Barton 21493731df ngIRCd Release 20.1 2013-01-02 22:37:55 +01:00
Alexander Barton 950aeec3ff Use "${docdir}/Commands.txt" as help text file 2013-01-01 19:25:06 +01:00
Alexander Barton 1f59821270 Update Copyright notices for 2013 2013-01-01 19:23:56 +01:00
Alexander Barton 60a9a7f118 Add a note that "help file" is updated on startup and REHASH only 2013-01-01 15:35:58 +01:00
Alexander Barton 8ec09e3ca4 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! :-)
2013-01-01 15:11:31 +01:00
Alexander Barton 289a26e9e4 Implement Help() function parsing and returning the help text
This function parses the already read in help text and sends the requested
portions to the user. Parsing is done as following when a user user
issues a "HELP <cmd>" command:

 1. Search the file for a line "- <cmd>",
 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.
2013-01-01 14:57:03 +01:00
Alexander Barton 3e47bc9af5 Allow ERROR command on server and service links only
Ignore it and add a penalty time on all other link types.
2012-12-31 21:46:48 +01:00
Alexander Barton d2a1f6aa4b Document "HelpFile" in sample-ngircd.conf and ngircd.conf.5 2012-12-31 21:03:23 +01:00
Alexander Barton f68aa02272 Implement new configuration option "HelpFile"
This new configuration option allows to specify a specially formatted
text file which can be used by the HELP command to provide information
about the commands and their syntaxes.
2012-12-31 19:29:52 +01:00
Alexander Barton 588af510a3 IRC_HELP(): Code cleanup 2012-12-31 19:27:32 +01:00
Alexander Barton 9e1c25a889 Refactor Read_Motd() into Read_TextFile()
Now this function allows to read arbitrary text files into arrays.
2012-12-31 19:26:31 +01:00
Alexander Barton 5d92198487 Get rid of Conn_ResetPenalty(), it is unused 2012-12-31 18:23:21 +01:00
Alexander Barton 20ddffca0d Mode setting: only check channel user modes when on channel
Only check the channel user modes of the initiator if he is joined to
this channel and not an IRC operator enforcing modes (which requires
the configuration option "OperCanUseMode" to be enabled), because trying
to check channel user modes of a non-member results in this assertion:

 Assertion failed: (cl2chan != NULL), function Channel_UserModes,
  file channel.c, line 742.

This closes bug #147, thanks to James Kirwill <james.kirwill@bk.ru>
for tracking this down!
2012-12-31 18:13:18 +01:00
Alexander Barton 25e56a5e83 Add some more casts in assert() statemens
This fixes the following warning messages of gcc 4.5.3 on Cygwin when
building with debug code enabled:

 ng_ipaddr.c: In function ‘ng_ipaddr_init’:
 ng_ipaddr.c:52:2: warning: comparison between signed and
                   unsigned integer expressions
 ng_ipaddr.c:53:20: warning: comparison between signed and
                    unsigned integer expressions

 resolve.c: In function ‘ForwardLookup’:
 resolve.c:271:3: warning: comparison between signed and
                  unsigned integer expressions
2012-12-25 19:21:40 +01:00
Alexander Barton 1e5a7aac87 Makefiles: Correctly quote sed expressions
Now the Makefiles support spaces in "$sysconfdir", which isn't uncommon
for Cygwin for example, when $HOME contains whitespaces ("/home/User Name")
and ngIRCd is installed into the user home ("./configure --prefix=$HOME").
2012-12-25 19:14:31 +01:00
Alexander Barton b5b3dd9cfd Add Cygwin binaries (*.exe) to .gitignore files 2012-12-25 18:52:49 +01:00
Alexander Barton 92fba63ad8 Add a cast in ForwardLookup() to fix a gcc warning on Cygwin
This fixes the following warning message of 4.5.3 on Cygwin:

 resolve.c: In function ‘ForwardLookup’:
 resolve.c:273:21: warning: comparison between signed and
                   unsigned integer expressions
2012-12-25 18:49:28 +01:00
Alexander Barton 25d35dd6f4 ngIRCd Release 20 2012-12-17 13:14:32 +01:00
Alexander Barton a445abc10e Update NEWS and ChangeLog files 2012-12-12 11:06:35 +01:00
Alexander Barton 1342f78b09 Allow user names up to 20 characters
This patch allows user names up to 20 characters when ngIRCd has not been
configured for "strict RFC mode".

Patch suggested by Brett Smith <brett@w3.org>, see
<http://arthur.barton.de/pipermail/ngircd-ml/2012-October/000579.html>.
2012-12-10 10:41:36 +01:00
Alexander Barton a0d57a6afd ngIRCd 20~rc2 2012-12-02 18:51:51 +01:00
Alexander Barton c6ae353756 Update NEWS and ChangeLog files 2012-12-02 18:49:11 +01:00
Alexander Barton 12768e7a54 Update doc/Platforms.txt 2012-11-26 11:54:23 +01:00
Alexander Barton 35e2dcff88 Rework cloaked hostname handling, implement "METADATA cloakhost"
Now ngIRCd uses two fields internally, one to store the "real" hostname
and one to save the "cloaked" hostname. And both fields can be set
independently using the "METADATA host" and "METADATA cloakhost" commands.

This allows "foreign servers" (aka "IRC services") to alter the real and
cloaked hostnames of clients without problems, even when the user itself
issues additional "MODE +x" and "MODE -x" commands.
2012-11-24 16:15:35 +01:00
Alexander Barton dc89e42ef5 RPL_UMODEIS: send correct target name, even on server links 2012-11-24 15:57:45 +01:00
Alexander Barton 4a2d74c9ab Client_HostnameCloaked() -> Client_HostnameDisplayed() 2012-11-24 13:37:56 +01:00
Alexander Barton cd48b8128e platformtest.sh: Only generate configure script when missing 2012-11-13 23:21:09 +01:00
Alexander Barton 301d4915bc Update platformtest.sh to follow autoconf changes 2012-11-13 22:46:06 +01:00
Alexander Barton 8061056cec Test suite: correctly execute tests when stdout is redirected 2012-11-13 22:46:06 +01:00
Alexander Barton 44926b7f9f Add a few casts, fix compiler warnings on NetBSD 5
This fixes a few warnings of this type:
  XXX.c: In function 'AAA':
  XXX.c:YY: warning: array subscription has type 'char'

Tested on NetBSD 5.0.2 with gcc 4.1.3.
2012-11-12 22:39:57 +01:00
Alexander Barton d11a700589 irc-info.c: Use strlcpy() instead of strcpy()
This fixes the following warning of gcc (tested on OpenBSD 5.0:)
  irc-info.c:990: warning: strcpy() is almost always misused,
                  please use strlcpy
2012-11-11 16:46:57 +01:00
Alexander Barton 0a26079af2 ngIRCd 20~rc1 2012-11-11 16:03:40 +01:00