]> granicus.if.org Git - ngircd/log
ngircd
12 years agoERR_CHANNELISFULL_MSG: better wording
Federico G. Schwindt [Wed, 26 Sep 2012 12:26:50 +0000 (13:26 +0100)]
ERR_CHANNELISFULL_MSG: better wording

(cherry picked from commit 0fcfa7e00fa8e098dd3724c7188c88ac82a52881)

12 years agoFix getpid.sh to work on Apple A/UX again
Alexander Barton [Wed, 26 Sep 2012 22:19:31 +0000 (00:19 +0200)]
Fix getpid.sh to work on Apple A/UX again

12 years agoSend RPL_REHASHING if rehash was accepted
Federico G. Schwindt [Wed, 26 Sep 2012 12:13:10 +0000 (13:13 +0100)]
Send RPL_REHASHING if rehash was accepted

(cherry picked from commit f1b171a09cd076f743a7fff221fa7aa752abb374)

12 years agoChange variable name "SSLDHFile" to "DHFile" in log messages
Federico G. Schwindt [Tue, 18 Sep 2012 23:52:50 +0000 (00:52 +0100)]
Change variable name "SSLDHFile" to "DHFile" in log messages

(cherry picked from commit d96db0a2e56d310177edb45d0a8b164a37992ab1)

12 years agoMove ConnSSL_InitLibrary() "dummy" from header into C file
Federico G. Schwindt [Tue, 18 Sep 2012 23:34:29 +0000 (00:34 +0100)]
Move ConnSSL_InitLibrary() "dummy" from header into C file

(cherry picked from commit 5fd88c81a70d0c9e627f08522e57d251586288eb)

12 years agoNJOIN: correctly reset channel level flags
Alexander Barton [Wed, 26 Sep 2012 21:51:05 +0000 (23:51 +0200)]
NJOIN: correctly reset channel level flags

This fixes commit 7b01bb83.
Bug reported by DNS777 <dns@rbose.org>, thanks!

12 years agoSimplify check for valid user names in IRC_USER().
Alexander Barton [Wed, 26 Sep 2012 21:28:13 +0000 (23:28 +0200)]
Simplify check for valid user names in IRC_USER().

Patches from Federico G. Schwindt, thanks!

(cherry picked from commit a44b7126227ba1118ec02b399e31b08102af5e8c
and 6fbe9583753b2620da275676cde46a89cb4d06c2)

12 years agoAllow user mode +x only when "CloakHostModeX" is set
Alexander Barton [Wed, 26 Sep 2012 20:52:06 +0000 (22:52 +0200)]
Allow user mode +x only when "CloakHostModeX" is set

Allow users to "cloak" their hostname only when the configuration
variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only
IRC opertators, other servers, and services are allowed to set mode +x.

This prevents regular users from changing their hostmask to the name
of the IRC server itself, which confused quite a few people ;-)

This fixes bug #133.

12 years agoNew configuration option "OperChanPAutoOp"
DNS777 [Tue, 25 Sep 2012 11:08:39 +0000 (13:08 +0200)]
New configuration option "OperChanPAutoOp"

If disabled, IRC operators don't become channel operators in persistent
channels when joining. Enabled by default, which has been the behavior
of ngIRCd up to this patch.

Closes bug #135.

(Cosmetic fixes by Alex.)

12 years agoAllow opers to see secret (+s) channels in LIST command
DNS777 [Tue, 25 Sep 2012 10:55:07 +0000 (12:55 +0200)]
Allow opers to see secret (+s) channels in LIST command

As long as 'MorePrivacy' isn't enabled in the configuration file, local
IRC operators can see secret (+s) channels when using the LIST command.

Closes bug #136.

12 years agoconfigure: only use AM_PROG_AR when available
Alexander Barton [Mon, 24 Sep 2012 18:56:24 +0000 (20:56 +0200)]
configure: only use AM_PROG_AR when available

This fixes commit 78d189fb on systems with older automake ...

12 years agoRemove all geneerated Makefile.am on "make maintainer-clean"
Alexander Barton [Mon, 24 Sep 2012 18:45:37 +0000 (20:45 +0200)]
Remove all geneerated Makefile.am on "make maintainer-clean"

12 years agoRename configure.in to configure.ac
Alexander Barton [Mon, 24 Sep 2012 18:40:31 +0000 (20:40 +0200)]
Rename configure.in to configure.ac

This fixes

  automake: warning: autoconf input should be named 'configure.ac',
  not 'configure.in'

when running the autogen.sh script.

12 years agoconfigure.ng: use AM_PROG_AR to check ar(1) command
Alexander Barton [Mon, 24 Sep 2012 18:39:06 +0000 (20:39 +0200)]
configure.ng: use AM_PROG_AR to check ar(1) command

This fixes

  automake-1.12/am/library.am: warning: 'libngipaddr.a':
   linking libraries using a non-POSIX .../automake-1.12/am/library.am:
   archiver requires 'AM_PROG_AR' in 'configure.in'
   src/ipaddr/Makefile.am:12: while processing library 'libngipaddr.a'

and similar warnings of automake.

12 years agoMerge branch 'automake-am11-am12'
Alexander Barton [Mon, 24 Sep 2012 18:28:02 +0000 (20:28 +0200)]
Merge branch 'automake-am11-am12'

* automake-am11-am12:
  autogen.sh: detect automake version format a.b.c and a.b
  configure.ng: don't require GIT tree to detect version string
  Include .mailmap file in distribution archives
  Include all build-system files into distribution archives
  Change build system to support new and old GNU automake

12 years agoautogen.sh: detect automake version format a.b.c and a.b
Alexander Barton [Mon, 24 Sep 2012 16:01:47 +0000 (18:01 +0200)]
autogen.sh: detect automake version format a.b.c and a.b

12 years agoconfigure.ng: don't require GIT tree to detect version string
Alexander Barton [Mon, 24 Sep 2012 16:00:36 +0000 (18:00 +0200)]
configure.ng: don't require GIT tree to detect version string

12 years agoInclude .mailmap file in distribution archives
Alexander Barton [Mon, 24 Sep 2012 15:50:32 +0000 (17:50 +0200)]
Include .mailmap file in distribution archives

12 years agoINSTALL: update GNU automake/autoconf requirements
Alexander Barton [Mon, 24 Sep 2012 15:46:22 +0000 (17:46 +0200)]
INSTALL: update GNU automake/autoconf requirements

12 years agoautomake: don't use INCLUDES, it's AM_CPPFLAGS nowadays
Alexander Barton [Mon, 24 Sep 2012 15:45:15 +0000 (17:45 +0200)]
automake: don't use INCLUDES, it's AM_CPPFLAGS nowadays

12 years agoautomake: enable colored test output, if available
Alexander Barton [Mon, 24 Sep 2012 15:43:02 +0000 (17:43 +0200)]
automake: enable colored test output, if available

The "color-tests" option can't be checked for, but is available starting
with automake 1.11 which introduced AM_SILENT_RULES -- so we check this ...

12 years agoAdd doc/Contributing.txt to distribution archive
Alexander Barton [Mon, 24 Sep 2012 15:40:33 +0000 (17:40 +0200)]
Add doc/Contributing.txt to distribution archive

12 years agoInclude all build-system files into distribution archives
Alexander Barton [Mon, 24 Sep 2012 12:34:16 +0000 (14:34 +0200)]
Include all build-system files into distribution archives

12 years agoLoose GNU autoconf / automake requirements a bit
Alexander Barton [Mon, 24 Sep 2012 08:22:21 +0000 (10:22 +0200)]
Loose GNU autoconf / automake requirements a bit

Now ngIRCd requires at least GNU autoconf 2.61 and automake 1.10, the
requirements of commit 67e882d4 have been too restrictive:

             19.2      67e882d4  now
  ---------- --------- --------- ---------
  autoconf   >=2.50    >=2.67    >=2.61
  automake   >=1.6     >=1.11    >=1.10

The tools required now are supported by Debian GNU/Linux 4.0 "Etch",
RedHat Enterprise Linux 5, and Mac OS X 10.6.x for example.

I read the changelogs of autoconf and automake, and I think ther's nothing
that prevents it from working with these older versions; and we don't want
to force users to upgrade without real benefits.

Please note: the recommended versions are still autoconf 1.11.x and the
most recent autoconf release that works with automake 1.11.x!

12 years agoMerge branch 'bug92-xop'
Alexander Barton [Sun, 23 Sep 2012 17:58:50 +0000 (19:58 +0200)]
Merge branch 'bug92-xop'

By Alexander Barton (5) and Sebastian Köhler (2)

* bug92-xop:
  Fix NAMES/WHO response when client has multi-prefix
  Fix prefix of "halfop" when "multi-prefix" is active
  Clean up doc/.gitignore
  doc/Modes.txt: add version number to new channel modes
  Fix some "whitespace glitches"
  Tests and documentation for xop
  Implemented xop support

Conflicts (because of "multi-prefix fix"):
src/ngircd/irc-info.c

This fixes bug #92 "ngircd does not support XOP usermodes".

12 years agoFix NAMES/WHO response when client has multi-prefix
Alexander Barton [Sun, 23 Sep 2012 17:37:06 +0000 (19:37 +0200)]
Fix NAMES/WHO response when client has multi-prefix

This has been fixed by commit 16f94546 "Fix NAMES response when
client has multi-prefix" in the master branch, fix it in this patch
series, too.

12 years agoFix prefix of "halfop" when "multi-prefix" is active
Alexander Barton [Sun, 23 Sep 2012 17:23:23 +0000 (19:23 +0200)]
Fix prefix of "halfop" when "multi-prefix" is active

12 years agoChange build system to support new and old GNU automake
Alexander Barton [Sun, 23 Sep 2012 15:55:48 +0000 (17:55 +0200)]
Change build system to support new and old GNU automake

Starting with GNU automake 1.12, the "de-ANSI-fication support" has been
removed, which ngIRCd used to enable building itself on very old systems.

Now the problem is, that using automake >= 1.12 isn't working because of
the now unsupported M4 macros. Therefore the solution that this patch
implements is to dynamically generate the automake input files with our
own ./autogen.sh script:

  configure.ng => configure.in
  Makefile.ng => Makefile.am

This is quite an ugly approach, but it works and enables us to:

  1. use current automake >= 1.12 for development and "private builds",
  2. still build distribution archives using automake 1.11.x that have
     "de-ANSI-fication support" enabled in the generated Makefile's.

And if you are using Makefile's generated with a automake version newer
than 1.11.x (without "de-ANSI-fication support"), the ./configure script
warns you not to use this generated build system to generate distribution
archives.

Drawback of this patch: you MUST use our autogen.sh script, you can't call
the autoconf/automake commands directly any more; but autoreconf should
still work ...

12 years agoClean up doc/.gitignore
Alexander Barton [Sun, 23 Sep 2012 15:52:53 +0000 (17:52 +0200)]
Clean up doc/.gitignore

12 years agodoc/Modes.txt: add version number to new channel modes
Alexander Barton [Sun, 23 Sep 2012 15:52:26 +0000 (17:52 +0200)]
doc/Modes.txt: add version number to new channel modes

12 years agoFree all listen ports on initialization
Alexander Barton [Fri, 21 Sep 2012 08:41:03 +0000 (10:41 +0200)]
Free all listen ports on initialization

Now you can reconfigure listen ports and reload the server configuration
on runtime. Without this patch, no ports could be removed.

12 years agoInitialize SSL when needed only, and disable SSL on errors
Alexander Barton [Fri, 21 Sep 2012 08:36:09 +0000 (10:36 +0200)]
Initialize SSL when needed only, and disable SSL on errors

With this patch, the SSL subsystem will only be initialized if at least
one SSL ports is configured; so you won't get "SSL initialization failed"
messages if you didn't configured it at all.

And if SSL initialization fails, no SSL listen ports will be enabled
later which never could establish a working SSL connection at all ...

12 years agoSort "feature string" alphabetically
Alexander Barton [Sun, 16 Sep 2012 22:55:30 +0000 (00:55 +0200)]
Sort "feature string" alphabetically

12 years agoInclude CAP command even when using "strict RFC mode"
Alexander Barton [Sun, 16 Sep 2012 12:08:52 +0000 (14:08 +0200)]
Include CAP command even when using "strict RFC mode"

12 years agoMerge branch 'autoconf-update'
Alexander Barton [Sun, 16 Sep 2012 11:05:23 +0000 (13:05 +0200)]
Merge branch 'autoconf-update'

Update GNU autoconf and automake infrastructure.
Tested on modern systems as well as Apple A/UX :-)

* autoconf-update:
  AUTOMAKE_OPTIONS: fix ansi2knr option, include path
  Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC
  Make our own targets "silent", if enabled
  configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE
  Updated config.{guess|sub} to version 2012-08-14
  Make autogen.sh more verbose when VERBOSE=1 is set
  configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)
  configure.in: use AS_HELP_STRING macro
  configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)
  configure.in: inttypes.h is an optional header file
  Use HAVE_SETSID #define when testing for setsid()
  Don't include <stdint.h>, it is included by "portab.h"
  Don't check type.h availability, it is required
  configure.in: Use AC_CONFIG_FILES macro
  configure.in: Don't use AC_C_PROTOTYPES
  configure.in: Update checks for required and optional features
  configure.in: require autoconf 2.67 and automake 1.11
  configure.in: sort some lists (templates, output, ...)

12 years agoAUTOMAKE_OPTIONS: fix ansi2knr option, include path
Alexander Barton [Sun, 16 Sep 2012 10:43:12 +0000 (12:43 +0200)]
AUTOMAKE_OPTIONS: fix ansi2knr option, include path

Set correct relative path to ansi2knr.c in AUTOMAKE_OPTIONS, so that
ansi2knr.{1|c} is only included once in the distribution archive.

12 years agoDon't use AC_FUNC_MALLOC and AC_FUNC_REALLOC
Alexander Barton [Sat, 15 Sep 2012 18:26:59 +0000 (20:26 +0200)]
Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC

We don't expect the GNU'ish behaviour of of malloc() and realloc() and never
implemented the replacement functions rpl_malloc()/rpl_realloc() -- so these
test result in linking failues on systems that don't have a GNU'ish malloc()
and realloc() even though we don't require it!

Introduced by commit 47ad9afc.

12 years agoMake our own targets "silent", if enabled
Alexander Barton [Sat, 15 Sep 2012 17:15:16 +0000 (19:15 +0200)]
Make our own targets "silent", if enabled

12 years agoAllow limited punctuation in usernames, for better PAM integration.
Brett Smith [Fri, 14 Sep 2012 15:56:38 +0000 (11:56 -0400)]
Allow limited punctuation in usernames, for better PAM integration.

12 years agoconfigure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE
Alexander Barton [Thu, 13 Sep 2012 16:48:25 +0000 (18:48 +0200)]
configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE

12 years agoUpdated config.{guess|sub} to version 2012-08-14
Alexander Barton [Thu, 13 Sep 2012 16:32:28 +0000 (18:32 +0200)]
Updated config.{guess|sub} to version 2012-08-14

12 years agoMake autogen.sh more verbose when VERBOSE=1 is set
Alexander Barton [Thu, 13 Sep 2012 16:25:50 +0000 (18:25 +0200)]
Make autogen.sh more verbose when VERBOSE=1 is set

12 years agoconfigure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)
Alexander Barton [Thu, 13 Sep 2012 14:40:04 +0000 (16:40 +0200)]
configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)

Use the AC_SEARCH_LIBS macro to test for "sometimes but not always"
required libraries, not AC_CHECK_LIB.

12 years agoconfigure.in: use AS_HELP_STRING macro
Alexander Barton [Wed, 12 Sep 2012 22:25:09 +0000 (00:25 +0200)]
configure.in: use AS_HELP_STRING macro

12 years agoconfigure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)
Alexander Barton [Wed, 12 Sep 2012 22:06:08 +0000 (00:06 +0200)]
configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)

See the autoconf manual for details:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets

12 years agoconfigure.in: inttypes.h is an optional header file
Alexander Barton [Wed, 12 Sep 2012 14:01:11 +0000 (16:01 +0200)]
configure.in: inttypes.h is an optional header file

12 years agoMerge pull request #2 from briancollins/master
Alexander Barton [Tue, 11 Sep 2012 18:29:14 +0000 (11:29 -0700)]
Merge pull request #2 from briancollins/master

Fix IRC_Send_NAMES not sending correct prefix for certain clients.

12 years agoCorrectly re-initialize signal handlers on RESTART
Alexander Barton [Tue, 11 Sep 2012 13:44:31 +0000 (15:44 +0200)]
Correctly re-initialize signal handlers on RESTART

This fixes part 2 of bug #127 :-)

12 years agoUse HAVE_SETSID #define when testing for setsid()
Alexander Barton [Tue, 11 Sep 2012 12:38:19 +0000 (14:38 +0200)]
Use HAVE_SETSID #define when testing for setsid()

12 years agoDon't include <stdint.h>, it is included by "portab.h"
Alexander Barton [Tue, 11 Sep 2012 12:37:31 +0000 (14:37 +0200)]
Don't include <stdint.h>, it is included by "portab.h"

12 years agoDon't check type.h availability, it is required
Alexander Barton [Tue, 11 Sep 2012 12:36:34 +0000 (14:36 +0200)]
Don't check type.h availability, it is required

12 years agoconfigure.in: Use AC_CONFIG_FILES macro
Alexander Barton [Tue, 11 Sep 2012 12:36:02 +0000 (14:36 +0200)]
configure.in: Use AC_CONFIG_FILES macro

12 years agoconfigure.in: Don't use AC_C_PROTOTYPES
Alexander Barton [Tue, 11 Sep 2012 12:34:30 +0000 (14:34 +0200)]
configure.in: Don't use AC_C_PROTOTYPES

Don't use AC_C_PROTOTYPES, AM_C_PROTOTYPES is already used.

12 years agoconfigure.in: Update checks for required and optional features
Alexander Barton [Tue, 11 Sep 2012 12:32:17 +0000 (14:32 +0200)]
configure.in: Update checks for required and optional features

Update checks for required and optional header files, data types,
and functions.

12 years agoconfigure.in: require autoconf 2.67 and automake 1.11
Alexander Barton [Tue, 11 Sep 2012 12:30:49 +0000 (14:30 +0200)]
configure.in: require autoconf 2.67 and automake 1.11

And use newer features such as bug reporting address and project URL.

12 years agoconfigure.in: sort some lists (templates, output, ...)
Alexander Barton [Tue, 11 Sep 2012 12:13:17 +0000 (14:13 +0200)]
configure.in: sort some lists (templates, output, ...)

12 years agoNew_Connection(): mark "IsSSL" parameter as UNUSED
Alexander Barton [Tue, 11 Sep 2012 11:14:08 +0000 (13:14 +0200)]
New_Connection(): mark "IsSSL" parameter as UNUSED

This fixes the following warning message when building without SSL support:

 conn.c: In function "New_Connection":
 conn.c:1365: warning: unused parameter "IsSSL"

Introduced by commit 01b62202.

12 years agoFix some "whitespace glitches"
Alexander Barton [Tue, 11 Sep 2012 10:48:51 +0000 (12:48 +0200)]
Fix some "whitespace glitches"

Some have been introduced by commit 7b01bb83, some are older.

12 years agoMerge branch 'xop' of https://github.com/kart0ffelsack/ngircd into bug92-xop
Alexander Barton [Tue, 11 Sep 2012 10:30:19 +0000 (12:30 +0200)]
Merge branch 'xop' of https://github.com/kart0ffelsack/ngircd into bug92-xop

* 'xop' of https://github.com/kart0ffelsack/ngircd:
  Tests and documentation for xop
  Implemented xop support

Conflicts (because of merge of the 'cmode-M' branch):
src/ngircd/channel.c
src/ngircd/defines.h
src/ngircd/messages.h

12 years agoShow a warning on startup if config file is not a full path
Alexander Barton [Tue, 11 Sep 2012 09:40:47 +0000 (11:40 +0200)]
Show a warning on startup if config file is not a full path

ngIRCd is a long-running process and changes its working directory to "/" to
not block mounted filesystems and the like when running as daemon ("not in the
foreground"); therefore the path to the configuration file must be relative to
"/" (or the chroot() directory), which basically is "not relative", to ensure
that "kill -HUP" and the "REHASH" command work as expected later on.

This fixes parts of bug #127.

12 years agoCreate &SERVER channel after predefined channels
Alexander Barton [Mon, 10 Sep 2012 15:59:15 +0000 (17:59 +0200)]
Create &SERVER channel after predefined channels

This patch allows you to define &SERVER in a [Channel] block yourself
and to overwrite the built-in topic and channel modes.

Fixes bug #131.

12 years agoWHO #channel: don't limit list size
Alexander Barton [Mon, 10 Sep 2012 10:43:44 +0000 (12:43 +0200)]
WHO #channel: don't limit list size

It makes no sense to limit the list size when doing WHO for a channel
and not to return all the users in that channel, so I removed the check.
But if there are more than MAX_RPL_WHO(25) replies, the client requesting
the list will be "penalized" one second more (then 2 in total).

This fixes bug #125.

12 years agoDefine EV_SET() for kqueue() on systems that don't have it
Alexander Barton [Tue, 4 Sep 2012 21:28:32 +0000 (23:28 +0200)]
Define EV_SET() for kqueue() on systems that don't have it

Some systems, notably FreeBSD 4.x, do have the kqueue() function but
lack the definition of EV_SET() in their header files -- but don't
worry, we can #define it on our own ;-)

Definition taken from /usr/include/sys/event.h of FreeBSD 8.1.
Patch tested on FreeBSD 4.1 by Götz Hoffart. Thanks!

12 years agoFix contrib/Makefile.am to list all files in EXTRA_DIST
Alexander Barton [Tue, 4 Sep 2012 20:48:47 +0000 (22:48 +0200)]
Fix contrib/Makefile.am to list all files in EXTRA_DIST

12 years agoUpdate project description
Alexander Barton [Tue, 4 Sep 2012 11:09:27 +0000 (13:09 +0200)]
Update project description

12 years agoNew function Conn_StartLogin() to finish connection initialization
Alexander Barton [Wed, 29 Aug 2012 15:24:19 +0000 (17:24 +0200)]
New function Conn_StartLogin() to finish connection initialization

Conn_StartLogin() is called after the connection has been established and
fully innitialized, including the SSL handshake, for example.

Up to this patch, the "NoticeAuth" option broke the SSL handshake ...

12 years agoConvert CONN_ID and Conf_MaxConnections to "int" datatype
Alexander Barton [Wed, 29 Aug 2012 15:03:41 +0000 (17:03 +0200)]
Convert CONN_ID and Conf_MaxConnections to "int" datatype

We can't handle more connections than accept(2) can supply, and
accept(2) returns an "int" ...

12 years agoIntroduce numeric RPL_HOSTHIDDEN_MSG(396)
Alexander Barton [Tue, 28 Aug 2012 21:28:56 +0000 (23:28 +0200)]
Introduce numeric RPL_HOSTHIDDEN_MSG(396)

This numeric is sent to the client each time it changes its displayed
hostname using "MODE +/-x", and if "CloakHost" is set right after the
MOTD has been sent.

12 years agoAlways cloak client hostname, if needed
Alexander Barton [Tue, 28 Aug 2012 21:26:43 +0000 (23:26 +0200)]
Always cloak client hostname, if needed

Not only cloak the hostname in Client_MaskCloaked(), but also in
Client_HostnameCloaked() -- so move the actual cloaking to this function
and call it in Client_MaskCloaked() to get the (cloaked) hostname.

This fixes USERHOST not displaying the correctly cloaked hostname,
for example.

12 years agoNoticeAuth: make sure messages are flushed immediately
Alexander Barton [Tue, 28 Aug 2012 20:09:06 +0000 (22:09 +0200)]
NoticeAuth: make sure messages are flushed immediately

12 years agoMerge branch 'umode-B'
Alexander Barton [Mon, 27 Aug 2012 21:27:30 +0000 (23:27 +0200)]
Merge branch 'umode-B'

This patch series allows ngIRCd to support the user mode "B" ("Bot flasg"):
it is settable and unsettable by every (non-restricted) client.
According to DNS777, this is how Unreal and InspIRCd do behave, so do we :-)

By Alexander Barton (1) and DNS777 (1)

* umode-B:
  Add new user mode "B" to doc/Modes.txt
  Implement an Unreal-like user mode "B" ("Bot mode")

12 years agoMerge branch 'recognize-umode-R'
Alexander Barton [Mon, 27 Aug 2012 21:21:28 +0000 (23:21 +0200)]
Merge branch 'recognize-umode-R'

By Alexander Barton (1) and DNS777 (1)

* recognize-umode-R:
  Only allow IRC services to modify user mode "R"
  Recognize user mode "R"

12 years agoOnly allow IRC services to modify user mode "R"
Alexander Barton [Mon, 27 Aug 2012 21:20:32 +0000 (23:20 +0200)]
Only allow IRC services to modify user mode "R"

12 years agongt_RandomStr(): : make it buildable with pre-ANSI C compilers
Alexander Barton [Mon, 27 Aug 2012 20:42:52 +0000 (22:42 +0200)]
ngt_RandomStr(): : make it buildable with pre-ANSI C compilers

12 years agoGet_CAP_String(): make it buildable with pre-ANSI C compilers
Alexander Barton [Mon, 27 Aug 2012 20:42:04 +0000 (22:42 +0200)]
Get_CAP_String(): make it buildable with pre-ANSI C compilers

12 years agoEnhance "NOTICE AUTH": show hostname and IDENT reply
Alexander Barton [Mon, 27 Aug 2012 20:05:55 +0000 (22:05 +0200)]
Enhance "NOTICE AUTH": show hostname and IDENT reply

12 years agoMerge branch 'cmode-M'
Alexander Barton [Mon, 27 Aug 2012 19:22:58 +0000 (21:22 +0200)]
Merge branch 'cmode-M'

By Alexander Barton (2) and DNS777 (1)

* cmode-M:
  Add new channel mode "M" to doc/Modes.txt
  Remove Can_Send_To_Channel_Identified()
  Implement channel mode "M"

12 years agoAdd new channel mode "M" to doc/Modes.txt
Alexander Barton [Mon, 27 Aug 2012 19:17:49 +0000 (21:17 +0200)]
Add new channel mode "M" to doc/Modes.txt

12 years agoRemove Can_Send_To_Channel_Identified()
Alexander Barton [Sun, 26 Aug 2012 14:51:34 +0000 (16:51 +0200)]
Remove Can_Send_To_Channel_Identified()

Move the functionality directly into Can_Send_To_Channel() function.
There should be no functional change ...

12 years agoFix NAMES response when client has multi-prefix
Brian Collins [Mon, 27 Aug 2012 15:14:47 +0000 (16:14 +0100)]
Fix NAMES response when client has multi-prefix

Two fixes here: IRC_Send_NAMES was checking the capability of the
wrong client when responding, and it didn't return any prefix for
clients that had either +v or +o but not both.

12 years agoMerge branch 'better-chan-errors'
Alexander Barton [Sun, 26 Aug 2012 17:42:08 +0000 (19:42 +0200)]
Merge branch 'better-chan-errors'

By Alexander Barton (1) and DNS777 (1)

* better-chan-errors:
  Remove unused ERR_CANNOTSENDTOCHAN2_MSG message
  Add some more information to channel error numerics

12 years agoMerge branch 'move-connection-password' of git://arthur.barton.de/ngircd-alex
Alexander Barton [Sun, 26 Aug 2012 17:14:29 +0000 (19:14 +0200)]
Merge branch 'move-connection-password' of git://arthur.barton.de/ngircd-alex

This patch series converts the statically allocated password buffer in the
CLIENT structure into a dynamically (and only when needed) allocated buffer
which is referenced by the CONNECTION structure.

This a) saves memory for clients not using passwords at all and b) allows
for "arbitrarily" long passwords.

By Brett Smith (5) and Alexander Barton (2).

* 'move-connection-password' of git://arthur.barton.de/ngircd-alex:
  Login_User(): use "conn" insted of calling Client_Conn(Client)
  Free already saved password when storing a new one
  Indentation and style fixes.
  Connection password is not constant.
  Implementation clean-ups.
  Dynamically allocate memory for connection password.
  Move client password from the Client to the Connection struct.

12 years agoLogin_User(): use "conn" insted of calling Client_Conn(Client)
Alexander Barton [Sun, 26 Aug 2012 17:11:44 +0000 (19:11 +0200)]
Login_User(): use "conn" insted of calling Client_Conn(Client)

12 years agoFree already saved password when storing a new one
Alexander Barton [Sun, 26 Aug 2012 17:05:08 +0000 (19:05 +0200)]
Free already saved password when storing a new one

This shouldn't happen (clients aren't allowed to send more than one PASS
command), but who knows ...

12 years agoImplement channel mode "M"
DNS777 [Thu, 23 Aug 2012 09:25:30 +0000 (09:25 +0000)]
Implement channel mode "M"

Only the server, identified users and IRC operators are able to talk.

12 years agoRemove unused ERR_CANNOTSENDTOCHAN2_MSG message
Alexander Barton [Sun, 26 Aug 2012 14:15:44 +0000 (16:15 +0200)]
Remove unused ERR_CANNOTSENDTOCHAN2_MSG message

12 years agoAdd some more information to channel error numerics
DNS777 [Thu, 23 Aug 2012 09:25:30 +0000 (09:25 +0000)]
Add some more information to channel error numerics

12 years agoAdd new user mode "B" to doc/Modes.txt
Alexander Barton [Sun, 26 Aug 2012 14:03:00 +0000 (16:03 +0200)]
Add new user mode "B" to doc/Modes.txt

12 years agoImplement an Unreal-like user mode "B" ("Bot mode")
DNS777 [Thu, 23 Aug 2012 09:25:30 +0000 (09:25 +0000)]
Implement an Unreal-like user mode "B" ("Bot mode")

12 years agoRecognize user mode "R"
DNS777 [Thu, 23 Aug 2012 09:25:30 +0000 (09:25 +0000)]
Recognize user mode "R"

This allows users to unset the user mode "R".

12 years agoEnhance "ServiceMask" to handle a list of masks
Alexander Barton [Sun, 26 Aug 2012 11:24:54 +0000 (13:24 +0200)]
Enhance "ServiceMask" to handle a list of masks

The "ServiceMask" variable in "Server" blocks now can handle more than
one mask using the new MatchCaseInsensitiveList() function.

This makes marking "service clients" much more specific, which is a
good thing per se, but which is the prerequisite for reasonably
blocking these nick names, too (see commit a6dd2e3 for details).

12 years agoNew function MatchCaseInsensitiveList() to check list of patterns
Alexander Barton [Sun, 26 Aug 2012 11:11:45 +0000 (13:11 +0200)]
New function MatchCaseInsensitiveList() to check list of patterns

12 years agoBlock nicknames that are reserved for services
Alexander Barton [Sun, 26 Aug 2012 10:33:21 +0000 (12:33 +0200)]
Block nicknames that are reserved for services

This patch introduces the new function Conf_NickIsBlocked() which checks
if a given nick name matches with the "service mask" of a configured server.
And Client_CheckNick() uses this information to deny such names for regular
IRC users.

So nick names intended for IRC services are more protected and can't be used
by regular users even when the "services pseudo-server" isn't connected to
the network.

But please note:

Up to now, there can be only one "ServiceMask" pattern per server, which
most probably blocks much more nick names than really required ...
So "ServiceMask" should allow more than one pattern which can be more
specific, and most probably it should be possible to block nick names in
the global server configuration as well.

Nick names introduced by other servers/services are never restricted.

12 years agoRename Conf_IsService() to Conf_NickIsService()
Alexander Barton [Sun, 26 Aug 2012 10:27:51 +0000 (12:27 +0200)]
Rename Conf_IsService() to Conf_NickIsService()

12 years agoCheck_Connections(): code cleanup
Alexander Barton [Sun, 26 Aug 2012 10:04:40 +0000 (12:04 +0200)]
Check_Connections(): code cleanup

12 years agoIndentation and style fixes.
Brett Smith [Thu, 23 Aug 2012 18:18:15 +0000 (14:18 -0400)]
Indentation and style fixes.

12 years agoConnection password is not constant.
Brett Smith [Thu, 23 Aug 2012 17:59:17 +0000 (13:59 -0400)]
Connection password is not constant.

Saying otherwise makes a warning when we assign this to
conv.appdata_ptr in pam.c.

12 years agoImplementation clean-ups.
Brett Smith [Thu, 23 Aug 2012 16:24:34 +0000 (12:24 -0400)]
Implementation clean-ups.

* Have Conn_Password return an empty string when no password has been set,
  to play better with pam.c.

* Use strdup in Conn_SetPassword.

12 years agoDynamically allocate memory for connection password.
Brett Smith [Thu, 23 Aug 2012 16:12:15 +0000 (12:12 -0400)]
Dynamically allocate memory for connection password.

12 years agoMove client password from the Client to the Connection struct.
Brett Smith [Thu, 23 Aug 2012 15:07:08 +0000 (11:07 -0400)]
Move client password from the Client to the Connection struct.

This is a relatively naive implementation, basically doing the bare minimum
necessary to make the switchover go.  Subsequent commits can focus on
improving the implementation.