]> granicus.if.org Git - ngircd/log
ngircd
12 years agoImplemented xop support
Sebastian Köhler [Sat, 4 Aug 2012 12:19:58 +0000 (14:19 +0200)]
Implemented xop support

3 new channel user modes have been added.

Half Op: +h(Prefix: %) can set the channel modes +imntvIbek
and kick all +v and normal users.

Admin: +a(Prefix: &) can set channel modes +imntvIbekoRsz and kick all
+o, +h, +v and normal users.

Owner: +q(Prefix: ~) can set channel modes +imntvIbekoRsz and kick all
+a, +o, +h, +v and normal users

12 years agoHashed hostnames for CloakHost
Sebastian Köhler [Thu, 2 Aug 2012 17:44:40 +0000 (19:44 +0200)]
Hashed hostnames for CloakHost

Implemented support for hashed hostnames for CloakHost. The admin can
use '%x' in both the CloakHost and CloakHostModeX setting. The config
option CloakHostModeX was renamed to CloakHostSalt. This salt is used
for both cloaking options.

12 years agoImplemented hashed cloaked hostnames for +x
Sebastian Köhler [Thu, 2 Aug 2012 11:53:46 +0000 (13:53 +0200)]
Implemented hashed cloaked hostnames for +x

CloakHostModeX can now contain '%x'. It will be replace by the hash of
the original client hostname. The new config option CloakHostModeXSalt
defines the salt for the hash function. When CloakHostModeXSalt is not
set a random salt will be generated after each server restart.

Spelling fix in defines.h

12 years agongIRCd release 19.2 rel-19.2
Alexander Barton [Tue, 19 Jun 2012 09:47:15 +0000 (11:47 +0200)]
ngIRCd release 19.2

12 years agodoc/Capabilities.txt: document "multi-prefix" capability
Alexander Barton [Wed, 13 Jun 2012 10:19:56 +0000 (12:19 +0200)]
doc/Capabilities.txt: document "multi-prefix" capability

12 years agongIRCd release 19.2~rc1 rel-19.2-rc1
Alexander Barton [Wed, 13 Jun 2012 09:40:24 +0000 (11:40 +0200)]
ngIRCd release 19.2~rc1

12 years agoMerge branch 'bug124-CloakHostModeX'
Alexander Barton [Mon, 11 Jun 2012 08:44:02 +0000 (10:44 +0200)]
Merge branch 'bug124-CloakHostModeX'

* bug124-CloakHostModeX:
  Describe "CloakHostModeX" in sample-ngircd.conf an ngircd.conf(5)
  Rename "CloakModeHost" option to "CloakHostModeX"
  Introduce new configuration option "CloakModeHost"

This closes bug #124.

12 years agoUpdate ChangeLog and NEWS files
Alexander Barton [Sat, 9 Jun 2012 10:53:44 +0000 (12:53 +0200)]
Update ChangeLog and NEWS files

12 years agoDescribe "CloakHostModeX" in sample-ngircd.conf an ngircd.conf(5)
Alexander Barton [Sat, 9 Jun 2012 00:04:50 +0000 (02:04 +0200)]
Describe "CloakHostModeX" in sample-ngircd.conf an ngircd.conf(5)

12 years agoRename "CloakModeHost" option to "CloakHostModeX"
Alexander Barton [Fri, 8 Jun 2012 23:57:17 +0000 (01:57 +0200)]
Rename "CloakModeHost" option to "CloakHostModeX"

12 years agoIntroduce new configuration option "CloakModeHost"
Christoph Biedl [Fri, 8 Jun 2012 23:55:22 +0000 (01:55 +0200)]
Introduce new configuration option "CloakModeHost"

This closes bug #124.

12 years agoCorrectly handle asynchronously re-established server links
Alexander Barton [Fri, 8 Jun 2012 23:03:48 +0000 (01:03 +0200)]
Correctly handle asynchronously re-established server links

Don't try to establish an outgoing server link after DNS lookup when this
server re-connected on its own in the meantime.
In addition, log a warning message if we try to update the connection
index of an already connected server structure -- and ignore it.

Up to now, both behaviour could lead to a race when the remote server
connects to this daemon while it still prepares the outgoing connection:

 - The local server prepares the new outgoing connection ...
 - in the meantime the remote server becomes connected and registered.
 - Now the new outgoing connection overwrites the (correct) socket handle,
 - then the 2nd connection becomes disconnected: "already registered",
 - and the 1st connection becomes unhandled ("gets lost") because the
   configuration structure is reset because of the wrong socket handle.

This patch hopefully fixes all these problems.

12 years agoLog a debug message when SIGUSR2 is handled
Alexander Barton [Fri, 8 Jun 2012 20:08:52 +0000 (22:08 +0200)]
Log a debug message when SIGUSR2 is handled

12 years agodoc/Platforms.txt: more updates
Alexander Barton [Thu, 7 Jun 2012 15:09:45 +0000 (17:09 +0200)]
doc/Platforms.txt: more updates

Added:
 - armv6l/unkn./linux-gnueabi, gcc 4.4.5
 - i686/pc/linux-gnu, gcc 2.7.2

Updated:
 - i386/pc/solaris2.11, gcc 4.2.3

Thanks to Götz Hoffart!

12 years agoNoticeAuth: Fix test if IDENT reply has been invalid
Alexander Barton [Fri, 1 Jun 2012 22:32:19 +0000 (00:32 +0200)]
NoticeAuth: Fix test if IDENT reply has been invalid

This fixes

 conn.c: In function ‘cb_Read_Resolver_Result’:
 conn.c:2252: warning: comparison between pointer and integer

12 years agoIDENT reply: only allow alphanumeric characters in user name
Alexander Barton [Fri, 1 Jun 2012 22:24:53 +0000 (00:24 +0200)]
IDENT reply: only allow alphanumeric characters in user name

Only alphanumeric characters are allowed in the user name, so ignore
all IDENT replies that would violate this rule and use the one supplied
by the USER command.

12 years agoUSER command: only allow alphanumeric characters in user name
Alexander Barton [Fri, 1 Jun 2012 21:57:51 +0000 (23:57 +0200)]
USER command: only allow alphanumeric characters in user name

Only alphanumeric characters are allowed in the user name, so terminate
the connection if any "strage" characters have been supplied by the user.

This is how other IRC daemons (like ircd2.11 and ircd-seven) behave ...

12 years agodoc/Platforms.txt: add powerpc/apple/darwin7.9.0
Alexander Barton [Tue, 29 May 2012 15:21:03 +0000 (17:21 +0200)]
doc/Platforms.txt: add powerpc/apple/darwin7.9.0

12 years agoChange wording of "TLS initialized" message
Alexander Barton [Wed, 23 May 2012 15:08:42 +0000 (17:08 +0200)]
Change wording of "TLS initialized" message

Don't use the word "socket" to identify the connection number, but use the
word "connection" like on all the other messages logged.

12 years agoPidfile_Create(): Don't leak file descriptor on error path
Alexander Barton [Tue, 22 May 2012 11:29:31 +0000 (13:29 +0200)]
Pidfile_Create(): Don't leak file descriptor on error path

Detected by cppcheck:
 [src/ngircd/ngircd.c:502]: (error) Resource leak: pidfd

12 years agoINSTALL: Add "satisfy prerequisites" section
Alexander Barton [Fri, 18 May 2012 22:45:23 +0000 (00:45 +0200)]
INSTALL: Add "satisfy prerequisites" section

Include information for RedHat/Fedora and Debian/Ubuntu based
Linux distributions.

12 years agoNEWS, ChangeLog: fixed some misspellings
Alexander Barton [Mon, 7 May 2012 20:38:26 +0000 (22:38 +0200)]
NEWS, ChangeLog: fixed some misspellings

12 years agoNumeric 005 (ISUPPORT), CHANMODES: add missing mode "r"
Alexander Barton [Tue, 1 May 2012 11:42:57 +0000 (13:42 +0200)]
Numeric 005 (ISUPPORT), CHANMODES: add missing mode "r"

12 years agodoc/Platforms.txt: add "armv7l/unknown/linux-gnueabi"
Alexander Barton [Sun, 29 Apr 2012 20:45:46 +0000 (22:45 +0200)]
doc/Platforms.txt: add "armv7l/unknown/linux-gnueabi"

12 years agoAdd instructions for setting up Atheme.
William Pitcock [Sun, 29 Apr 2012 17:36:10 +0000 (17:36 +0000)]
Add instructions for setting up Atheme.

12 years agoirc-cap.c: mark arguments of Handle_CAP_ACK() as "unused"
Alexander Barton [Sun, 29 Apr 2012 10:39:28 +0000 (12:39 +0200)]
irc-cap.c: mark arguments of Handle_CAP_ACK() as "unused"

This fixes

 irc-cap.c: In function ‘Handle_CAP_ACK’:
 irc-cap.c:163: warning: unused parameter ‘Client’
 irc-cap.c:163: warning: unused parameter ‘Arg’

12 years agoirc-login.c, login.c: add missing include of "string.h"
Alexander Barton [Sun, 29 Apr 2012 10:36:23 +0000 (12:36 +0200)]
irc-login.c, login.c: add missing include of "string.h"

This fixes the following warnings with GCC 4.4.5 on Linux:

 irc-login.c: In function ‘IRC_PASS’:
 irc-login.c:92: warning: implicit declaration of function ‘strlen’
 irc-login.c:92: warning: incompatible implicit declaration of built-in function ‘strlen’
 irc-login.c:113: warning: incompatible implicit declaration of built-in function ‘strlen’
 irc-login.c:129: warning: implicit declaration of function ‘strchr’
 irc-login.c:129: warning: incompatible implicit declaration of built-in function ‘strchr’
 irc-login.c:133: warning: implicit declaration of function ‘strcmp’
 irc-login.c: In function ‘IRC_SERVICE’:
 irc-login.c:556: warning: incompatible implicit declaration of built-in function ‘strchr’
 login.c: In function ‘Login_User’:
 login.c:131: warning: implicit declaration of function ‘strcmp’

12 years agodoc/Modes.txt: Document missing channel mode "e"
Alexander Barton [Sun, 29 Apr 2012 10:11:50 +0000 (12:11 +0200)]
doc/Modes.txt: Document missing channel mode "e"

12 years agoMerge branch 'master' of /srv/git/ngircd
Alexander Barton [Fri, 27 Apr 2012 23:00:34 +0000 (01:00 +0200)]
Merge branch 'master' of /srv/git/ngircd

* 'master' of /srv/git/ngircd:
  "multi-prefix" capability 2/2: adjust NAME and WHO handlers
  "multi-prefix" capability 1/2: implement complete CAP infrastructure
  IRC_Send_NAMES(): Code cleanup
  New function Client_CapSet() in addition to Client_Cap{Add|Del}
  "CAP REQ" starts capability negotiation and delays user registration
  Xcode: update project file for Xcode 4.3
  Correctly handle "CAP END", new client type CLIENT_WAITCAPEND
  Implement core IRC capability handling and "CAP" command
  New "login" source file
  Introduce_Client() => Client_Introduce(), and move it to client.c

12 years agocontrib/platformtest.sh: support "CC=xxx MAKE=yyy ./platformtest.sh"
Alexander Barton [Fri, 27 Apr 2012 22:58:23 +0000 (00:58 +0200)]
contrib/platformtest.sh: support "CC=xxx MAKE=yyy ./platformtest.sh"

Now you can use contrib/platformtest.sh on platforms that require a "special"
make (not "make") or compiler (not cc/gcc) binary.

12 years agoMerge branch 'capabilities'
Alexander Barton [Fri, 27 Apr 2012 22:49:37 +0000 (00:49 +0200)]
Merge branch 'capabilities'

* capabilities:
  "multi-prefix" capability 2/2: adjust NAME and WHO handlers
  "multi-prefix" capability 1/2: implement complete CAP infrastructure
  IRC_Send_NAMES(): Code cleanup
  New function Client_CapSet() in addition to Client_Cap{Add|Del}
  "CAP REQ" starts capability negotiation and delays user registration
  Correctly handle "CAP END", new client type CLIENT_WAITCAPEND
  Implement core IRC capability handling and "CAP" command
  New "login" source file
  Introduce_Client() => Client_Introduce(), and move it to client.c

12 years ago"multi-prefix" capability 2/2: adjust NAME and WHO handlers
Alexander Barton [Fri, 27 Apr 2012 22:38:51 +0000 (00:38 +0200)]
"multi-prefix" capability 2/2: adjust NAME and WHO handlers

The NAME and WHO commands now return multiple usermode prfixes when
the "multi-prefix" capability is in effect for the requesting client.

See <http://ircv3.atheme.org/extensions/multi-prefix-3.1>

12 years ago"multi-prefix" capability 1/2: implement complete CAP infrastructure
Alexander Barton [Fri, 27 Apr 2012 22:36:41 +0000 (00:36 +0200)]
"multi-prefix" capability 1/2: implement complete CAP infrastructure

Now ngIRCd is able to handle "CAP LS", "CAP REQ", "CAP LIST", and
"CAP CLEAR" commands.

"multi-prefix" can be set/unset, but has no functionality - yet!

12 years agoIRC_Send_NAMES(): Code cleanup
Alexander Barton [Fri, 27 Apr 2012 22:20:42 +0000 (00:20 +0200)]
IRC_Send_NAMES(): Code cleanup

12 years agoNew function Client_CapSet() in addition to Client_Cap{Add|Del}
Alexander Barton [Fri, 27 Apr 2012 21:56:56 +0000 (23:56 +0200)]
New function Client_CapSet() in addition to Client_Cap{Add|Del}

12 years ago"CAP REQ" starts capability negotiation and delays user registration
Alexander Barton [Fri, 27 Apr 2012 20:47:22 +0000 (22:47 +0200)]
"CAP REQ" starts capability negotiation and delays user registration

New helper function Set_CAP_Negotiation().

12 years agoXcode: update project file for Xcode 4.3
Alexander Barton [Fri, 27 Apr 2012 13:52:09 +0000 (15:52 +0200)]
Xcode: update project file for Xcode 4.3

(No changes needed)

12 years agoplatformtest.sh: Detect Open64 C compiler
Alexander Barton [Tue, 24 Apr 2012 10:08:01 +0000 (12:08 +0200)]
platformtest.sh: Detect Open64 C compiler

12 years agoFix 8ec17063: "Lists_Add(): use size of destination when copying data"
Alexander Barton [Wed, 18 Apr 2012 15:54:54 +0000 (17:54 +0200)]
Fix 8ec17063: "Lists_Add(): use size of destination when copying data"

Thanks to Florian Westphal for spotting my silliness ...

12 years agoXcode: correctly sort conn-ssl.{c|h} files in file list
Alexander Barton [Tue, 17 Apr 2012 10:57:27 +0000 (12:57 +0200)]
Xcode: correctly sort conn-ssl.{c|h} files in file list

12 years agoLists_Add(): use size of destination when copying data
Alexander Barton [Tue, 17 Apr 2012 10:54:38 +0000 (12:54 +0200)]
Lists_Add(): use size of destination when copying data

This fixes the following warning of clang:

/src/ngircd/lists.c:152:44:
 warning: size argument in 'strlcpy' call appears to be size of the
 source; expected the size of the destination [-Wstrlcpy-strlcat-size]

But it isn't a real problem, because the size of the source always is the
same than the size of the destination ...

12 years agoCorrectly handle "CAP END", new client type CLIENT_WAITCAPEND
Alexander Barton [Sat, 31 Mar 2012 14:37:31 +0000 (16:37 +0200)]
Correctly handle "CAP END", new client type CLIENT_WAITCAPEND

12 years agoImplement core IRC capability handling and "CAP" command
Alexander Barton [Sat, 31 Mar 2012 13:59:06 +0000 (15:59 +0200)]
Implement core IRC capability handling and "CAP" command

This patch implements the core functions to support "IRC Capabilities"
and the IRC "CAP" command as used by other servers and specified here:
<http://www.leeh.co.uk/draft-mitchell-irc-capabilities-02.html>.

It enables ngIRCd to support the defined handshake, but it doesn't
implement any capabilities, so "CAP LS" and "CAP LIST" always return
the empty set and "CAP REQ ..." always fails with "CAP NAK".

12 years agoNew "login" source file
Alexander Barton [Sat, 31 Mar 2012 13:38:46 +0000 (15:38 +0200)]
New "login" source file

Rename Hello_User[_PostAuth] to Login_User[_PostAuth] and move it to the
new login.c; and move cb_Read_Auth_Result(), too. This will enable further
code to easily call Login_User() when required.

12 years agoIntroduce_Client() => Client_Introduce(), and move it to client.c
Alexander Barton [Sat, 31 Mar 2012 13:24:30 +0000 (15:24 +0200)]
Introduce_Client() => Client_Introduce(), and move it to client.c

12 years agoMakefiles: list each source files on a separate line
Alexander Barton [Sat, 31 Mar 2012 10:52:58 +0000 (12:52 +0200)]
Makefiles: list each source files on a separate line

Patches that add/remove source files become much nicer this way :-)

12 years agoAdd missing documentation files to Xcode project
Alexander Barton [Sat, 31 Mar 2012 10:51:33 +0000 (12:51 +0200)]
Add missing documentation files to Xcode project

12 years agoDon't ignore "permission denied" errors when enabling chroot
Alexander Barton [Wed, 28 Mar 2012 09:30:48 +0000 (11:30 +0200)]
Don't ignore "permission denied" errors when enabling chroot

Up to now, ngIRCd silently ignored permission denied errors when trying
to enable a chroot setup: only the "not running chrooted" message became
logged later on.

This patch lets ngIRCd exit with a fatal error when the chroot can't
be enabled on startup -- this is the much safer bevahiour!

12 years agoFAQ: enhance description of chroot setup
Alexander Barton [Wed, 28 Mar 2012 09:29:26 +0000 (11:29 +0200)]
FAQ: enhance description of chroot setup

12 years agongIRCd Release 19.1 rel-19.1
Alexander Barton [Mon, 19 Mar 2012 18:19:58 +0000 (19:19 +0100)]
ngIRCd Release 19.1

12 years agoUpdate ChangeLog for upcoming ngIRCd 19.1 release
Alexander Barton [Fri, 16 Mar 2012 12:55:00 +0000 (13:55 +0100)]
Update ChangeLog for upcoming ngIRCd 19.1 release

12 years agoFix gcc warning, initialize "list" variable to NULL
Alexander Barton [Mon, 12 Mar 2012 21:27:55 +0000 (22:27 +0100)]
Fix gcc warning, initialize "list" variable to NULL

This fixes the following warning with gcc 4.6.3.:

  irc-mode.c: In function "Channel_Mode":
  irc-mode.c:947:26: error: "list" may be used uninitialized
                     in this function
  irc-mode.c:884:25: error: "list" may be used uninitialized
                     in this function

(The variable has never been used uninitialized, so don't worry)

12 years agoFix manual page "hyphen-used-as-minus-sign" error (lintian)
Alexander Barton [Mon, 12 Mar 2012 10:02:17 +0000 (11:02 +0100)]
Fix manual page "hyphen-used-as-minus-sign" error (lintian)

Thanks to Christoph Biedl for reporting this!

12 years agoFix typo: Please not -> Please note
Alexander Barton [Mon, 12 Mar 2012 08:49:24 +0000 (09:49 +0100)]
Fix typo: Please not -> Please note

Thanks to Götz Hoffart!

12 years agoFix typo: recieved -> received
Alexander Barton [Mon, 12 Mar 2012 08:47:19 +0000 (09:47 +0100)]
Fix typo: recieved -> received

Thanks to Christoph Biedl.

12 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Mon, 5 Mar 2012 21:29:53 +0000 (22:29 +0100)]
Update NEWS and ChangeLog files

12 years agoReally include _all_ patches to build the Anope module
Alexander Barton [Mon, 5 Mar 2012 20:26:03 +0000 (21:26 +0100)]
Really include _all_ patches to build the Anope module

12 years agogetpid.sh: Fix testcase error for Debian using sbuild
Christoph Biedl [Sat, 3 Mar 2012 17:53:03 +0000 (18:53 +0100)]
getpid.sh: Fix testcase error for Debian using sbuild

When

 * building the ngircd Debian package (on Linux at least) and
 * using the sbuild build system,

the command "ps -af" does not include the commands running inside the
sbuild system. Therefore, start-server.sh will report a fail as getpid.sh
cannot not  find the ./T-ngircd1 just started although it's actually
running. This results in a funny build log ...

         starting server 1 ... failure!
   FAIL: start-server1
         running connect-test ... ok.
   PASS: connect-test

The self-test of getpid.sh however will likely succeed as it's happy if
it sees any process with "sh" somewhere in the name. Things go downhill
from there.

The confusing things are:

  * The alternative cowbuilder/pbuilder does not have this problem.
  * The alternative usage "ps ax" does fine.

So, as a quick hack, the patch attached adds another switch to getpid.sh.

12 years agoDon't log "ngIRCd hello message" two times
Alexander Barton [Fri, 2 Mar 2012 08:41:13 +0000 (09:41 +0100)]
Don't log "ngIRCd hello message" two times

Start "regular" logging not until the configuration file has been read in
and "SyslolgFacility" is set, and log all configuration errors using the
generic "daemon" facility.

So if there are no configuration errors, logging starts right after parsing
the configuration and we log the configuration file used _after_ reading it.
But this is no problem because every configuration error message includes
the configuration file name as well.

(The "double hello" has been introduced by commit 3641e5110952)

12 years agongIRCd release 19 rel-19
Alexander Barton [Wed, 29 Feb 2012 16:35:32 +0000 (17:35 +0100)]
ngIRCd release 19

12 years agoMerge branch 'master' of /srv/git/ngircd
Alexander Barton [Wed, 29 Feb 2012 13:47:37 +0000 (14:47 +0100)]
Merge branch 'master' of /srv/git/ngircd

* 'master' of /srv/git/ngircd:
  Update doc/Platforms.txt for ngIRCd 19
  doc/README-Interix.txt: note that GNU make should be used

12 years agoUpdate doc/Platforms.txt for ngIRCd 19
Alexander Barton [Wed, 29 Feb 2012 13:42:41 +0000 (14:42 +0100)]
Update doc/Platforms.txt for ngIRCd 19

12 years agodoc/README-Interix.txt: note that GNU make should be used
Alexander Barton [Wed, 29 Feb 2012 12:20:09 +0000 (13:20 +0100)]
doc/README-Interix.txt: note that GNU make should be used

12 years agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Mon, 27 Feb 2012 15:39:01 +0000 (16:39 +0100)]
Update config.guess and config.sub to recent versions

12 years agoDon't accept "[SSL]" in config when no SSL support is built in
Alexander Barton [Sun, 26 Feb 2012 14:52:12 +0000 (15:52 +0100)]
Don't accept "[SSL]" in config when no SSL support is built in

12 years agoFix C syntax: duplicate ";;" should be ";"
Alexander Barton [Sun, 26 Feb 2012 14:27:04 +0000 (15:27 +0100)]
Fix C syntax: duplicate ";;" should be ";"

Using gcc 2.7.2, this fixes:

 irc-channel.c: In function `join_allowed':
 irc-channel.c:86: parse error before `const'

12 years agoCorrectly re-open syslog logging after reading of configuration
Alexander Barton [Tue, 14 Feb 2012 10:01:13 +0000 (11:01 +0100)]
Correctly re-open syslog logging after reading of configuration

Syslog logging has been initialized before reading the configuraton
file, so ngIRCd always used the default facility and ignored the
"SyslogFacility" configuration option.

Thanks to Patrik Schindler for reporting this issue!

12 years agoLogging: remove "Activating ..." info message
Alexander Barton [Tue, 14 Feb 2012 09:32:58 +0000 (10:32 +0100)]
Logging: remove "Activating ..." info message

12 years agongIRCd release 19~rc1 rel-19-rc1
Alexander Barton [Sun, 12 Feb 2012 16:58:50 +0000 (17:58 +0100)]
ngIRCd release 19~rc1

12 years agoUpdate RPM spec file description to match Debian "control file"
Alexander Barton [Sun, 12 Feb 2012 16:57:33 +0000 (17:57 +0100)]
Update RPM spec file description to match Debian "control file"

12 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 12 Feb 2012 15:48:57 +0000 (16:48 +0100)]
Update NEWS and ChangeLog files

12 years agoFix forwarding of LIST commands
Alexander Barton [Sun, 12 Feb 2012 12:51:43 +0000 (13:51 +0100)]
Fix forwarding of LIST commands

Bug reported by Cahata, thanks!

12 years agoUpdate preliminary ngIRCd protocol module for Anope 1.9.6
Alexander Barton [Sat, 4 Feb 2012 11:55:41 +0000 (12:55 +0100)]
Update preliminary ngIRCd protocol module for Anope 1.9.6

12 years agoNew_Connection(): don't set the client hostname twice
Alexander Barton [Wed, 25 Jan 2012 16:11:44 +0000 (17:11 +0100)]
New_Connection(): don't set the client hostname twice

Setting the hostname twice doesn't do much harm a lot, but isn't elegant.
And for IPv6 addresses, it isn't correct the first time (missing []) ...

12 years agoClient_SetHostname(): Code cleanup, more debug logging
Alexander Barton [Wed, 25 Jan 2012 16:11:00 +0000 (17:11 +0100)]
Client_SetHostname(): Code cleanup, more debug logging

12 years agoio: use define for number of possible events
Florian Westphal [Tue, 24 Jan 2012 21:24:47 +0000 (22:24 +0100)]
io: use define for number of possible events

12 years agoio: remove outer do {} while loops for epoll/kqueue/devpoll backends
Florian Westphal [Tue, 24 Jan 2012 20:57:23 +0000 (21:57 +0100)]
io: remove outer do {} while loops for epoll/kqueue/devpoll backends

simplifies things a bit. io_dispatch() is called repeatedly from the
main loop.

12 years agoEnhance server command limits
Alexander Barton [Tue, 24 Jan 2012 01:55:53 +0000 (02:55 +0100)]
Enhance server command limits

This patch updates the limits for handling commands from a remote server:

 - "<user count> / 5 + <min>" using "<min>=10" during normal operation,
 - the above count multiplied with 5 while servers are syncing.

The intention is to a) make the limit dependent of the number of users
in the network (the more users, the more commands required to sync) and
b) to significantly rise this limit while servers are joining the network
to make the login and synchronization faster.

12 years agoSend a PING at the end of the server sync to detect it
Alexander Barton [Tue, 24 Jan 2012 01:46:12 +0000 (02:46 +0100)]
Send a PING at the end of the server sync to detect it

At the end of sending all "state" to the remote server, a PING command
is sent to request a PONG reply. Until then, no "regual" PING was sent,
so Conn_LastPing(<connection>) is null and now becomes non-null in the
PONG command handler.

So the servers are still synchronizing when Conn_LastPing(<connection>)
is 0, which could easily be tested.

12 years agoNew function Conn_UpdatePing() to update the "ping timestamp"
Alexander Barton [Tue, 24 Jan 2012 01:44:57 +0000 (02:44 +0100)]
New function Conn_UpdatePing() to update the "ping timestamp"

12 years agoConn_UpdateIdle(): Code cleanup
Alexander Barton [Tue, 24 Jan 2012 01:43:55 +0000 (02:43 +0100)]
Conn_UpdateIdle(): Code cleanup

12 years agoRPL_ISUPPORT_MSG(005): add "EXCEPTS=e INVEX=I"
Alexander Barton [Mon, 23 Jan 2012 21:07:40 +0000 (22:07 +0100)]
RPL_ISUPPORT_MSG(005): add "EXCEPTS=e INVEX=I"

Thanks to Cahata for the idea!

12 years agoFix "MAXLIST=beI:50": the limit is the sum of all lists
Alexander Barton [Mon, 23 Jan 2012 20:51:38 +0000 (21:51 +0100)]
Fix "MAXLIST=beI:50": the limit is the sum of all lists

"Modes which are specified in the same pair share the same maximum size",
so "beI:50" means a total of 50 entries, regardless of the list.

See <http://www.irc.org/tech_docs/draft-brocklesby-irc-isupport-03.txt>,
thanks to Cahata for reporting this!

12 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Mon, 23 Jan 2012 11:30:16 +0000 (12:30 +0100)]
Update NEWS and ChangeLog files

12 years agoNew RPL_WHOISHOST_MSG(378): show hostname and IP address
Alexander Barton [Sun, 22 Jan 2012 21:41:39 +0000 (22:41 +0100)]
New RPL_WHOISHOST_MSG(378): show hostname and IP address

The numeric RPL_WHOISHOST_MSG(378) returns the DNS hostname (if
available) and the IP address of a client in the WHOIS reply.

Only the user itself and local IRC operators get this numeric.

12 years agoNew function Conn_GetIPAInfo(): get IP address of a connection
Alexander Barton [Sun, 22 Jan 2012 21:35:27 +0000 (22:35 +0100)]
New function Conn_GetIPAInfo(): get IP address of a connection

12 years agoG/K-Lines: only add and delete valid IRC masks
Alexander Barton [Sun, 22 Jan 2012 17:53:16 +0000 (18:53 +0100)]
G/K-Lines: only add and delete valid IRC masks

12 years agoCheck G/K-Lines before the client has been registered, too
Alexander Barton [Sun, 22 Jan 2012 17:35:54 +0000 (18:35 +0100)]
Check G/K-Lines before the client has been registered, too

This allows to use "*!<user>@<host>" or "*!*@<host>" masks to reject
clients even before receiving PASS, NICK and USER commands and before
forking authentication child processes which reduces resource usage.

12 years agoStreamline handling of connection rejects (bad password, G/K-line)
Alexander Barton [Sun, 22 Jan 2012 17:33:45 +0000 (18:33 +0100)]
Streamline handling of connection rejects (bad password, G/K-line)

 - Use Client_Reject(), get rid of Reject_Client().
 - Refactor Class_IsMember() to Class_GetMemberReason(),
 - New function Class_HandleServerBans().

12 years agoNew function Client_Reject() to reject clients on connect
Alexander Barton [Sun, 22 Jan 2012 17:17:28 +0000 (18:17 +0100)]
New function Client_Reject() to reject clients on connect

12 years agoNew function Lists_CheckReason() to get reason of list entries
Alexander Barton [Sun, 22 Jan 2012 17:11:24 +0000 (18:11 +0100)]
New function Lists_CheckReason() to get reason of list entries

12 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 22 Jan 2012 14:58:39 +0000 (15:58 +0100)]
Update NEWS and ChangeLog files

12 years agoFix ERR_{SUMMON|USERS}DISABLED: don't repeat command name in reply
Alexander Barton [Sun, 22 Jan 2012 14:41:21 +0000 (15:41 +0100)]
Fix ERR_{SUMMON|USERS}DISABLED: don't repeat command name in reply

12 years agoImplement channel exception list (mode 'e')
Alexander Barton [Sat, 21 Jan 2012 18:59:57 +0000 (19:59 +0100)]
Implement channel exception list (mode 'e')

This allows a channel operator to define exception masks that allow users
to join the channel even when a "ban" would match and prevent them from
joining: the exception list (e) overrides the ban list (b).

12 years ago{Add|Del}_Ban_Invite > {Add_To|Del_From}_List(): more generic
Alexander Barton [Sat, 21 Jan 2012 18:27:03 +0000 (19:27 +0100)]
{Add|Del}_Ban_Invite > {Add_To|Del_From}_List(): more generic

12 years agoRename ShowInvitesBans() to ShowChannelList(), make it more flexible
Alexander Barton [Sat, 21 Jan 2012 12:48:31 +0000 (13:48 +0100)]
Rename ShowInvitesBans() to ShowChannelList(), make it more flexible

12 years agoPRIVMSG/NOTICE: handle nick!user@host masks case-insensitive
Alexander Barton [Sat, 21 Jan 2012 12:21:36 +0000 (13:21 +0100)]
PRIVMSG/NOTICE: handle nick!user@host masks case-insensitive

And enhance our test suite to check this a little bit better :-)

12 years agoPRIVMSG/NOTICE: don't stop list processing on invalid target
Alexander Barton [Mon, 16 Jan 2012 11:37:37 +0000 (12:37 +0100)]
PRIVMSG/NOTICE: don't stop list processing on invalid target

Process further targets, even if one has been a server ID:
just skip this one with an error message and continue.

12 years agoImplement user mode 'C': require "same channel" to send message
Alexander Barton [Mon, 16 Jan 2012 10:43:22 +0000 (11:43 +0100)]
Implement user mode 'C': require "same channel" to send message

If the target user of a PRIVMSG or NOTICE command has the user mode 'C'
set, it is required that both sender and receiver are on the same channel.

This prevents private flooding by completely unknown clients.

12 years agoNew RPL_WHOISREGNICK_MSG(307) numeric: indicate if nick is registered
Alexander Barton [Mon, 16 Jan 2012 01:18:24 +0000 (02:18 +0100)]
New RPL_WHOISREGNICK_MSG(307) numeric: indicate if nick is registered