]> arthur.barton.de Git - ngircd-alex.git/log
ngircd-alex.git
11 years agoFix NAMES/WHO response when client has multi-prefix bug92-xop
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.

11 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

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

11 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

11 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.

11 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

11 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.

11 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.

11 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.

11 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!

11 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

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

11 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 ...

11 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" ...

11 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.

11 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.

11 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

11 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")

11 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"

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

11 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

11 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

11 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

11 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"

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

11 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 ...

11 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

11 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.

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

11 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 ...

11 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.

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

11 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

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

11 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")

11 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".

11 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).

11 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

11 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.

11 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()

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

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

11 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.

11 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.

11 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.

11 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.

11 years agoXcode: use certificate of Alex for code signing
Alexander Barton [Tue, 21 Aug 2012 22:46:30 +0000 (00:46 +0200)]
Xcode: use certificate of Alex for code signing

When doing non-debug Xcode builds, use the "Developer ID Application:
Alexander Barton" certificate for code signing by default.

11 years ago"make uninstall": remove ngircd.conf if not modified
Alexander Barton [Sat, 18 Aug 2012 21:50:20 +0000 (23:50 +0200)]
"make uninstall": remove ngircd.conf if not modified

Now "make uninstall" removes the installed "ngircd.conf" file, if it
is still equal to our "sample-ngircd.conf" file and therefore hasn't
been modified by the user. If it has been modified, it isn't removed
and a notice is displayed to the user.

In addition, "make install" now displays a message when no ngircd.conf
file exists and the "sample-ngircd.conf" file will be installed as a
starting point.

11 years agocontrib/ngircd.service: systemd service file for ngircd systemd-service
Alexander Barton [Sat, 18 Aug 2012 13:51:28 +0000 (15:51 +0200)]
contrib/ngircd.service: systemd service file for ngircd

Thanks to Kyle Keen <keenerd@gmail.com>:

Date: Sat, 18 Aug 2012 08:28:22 -0400
Message-ID: <CAAKTTKNNmrB=8XtxcV6w1Q-RQ6J_xTTDGD4MHQFaDy6V3=B19Q@mail.gmail.com>
From: keenerd <keenerd@gmail.com>
To: ngircd-ml@ngircd.barton.de
Subject: [ngIRCd-ML] systemd service

Hello all.

Linked is a service file for ngircd.  Please add this to your source
tree so other people don't have to learn to write service files ;-)

https://projects.archlinux.org/svntogit/community.git/plain/trunk/ngircd.service?h=packages/ngircd

-Kyle Keen
Arch Linux TU
http://kmkeen.com

11 years agongt_RandomStr(): Add implicit cast to "unsigned".
Alexander Barton [Sat, 18 Aug 2012 10:34:11 +0000 (12:34 +0200)]
ngt_RandomStr(): Add implicit cast to "unsigned".

This fixes the following warning of Xcode 4.5:

 src/tool/tool.c:150:19:
  Implicit conversion loses integer precision: 'long' to 'unsigned int'

11 years agoFix a buffer overflow when initializing the random salt for "+x"
Alexander Barton [Thu, 16 Aug 2012 21:51:28 +0000 (23:51 +0200)]
Fix a buffer overflow when initializing the random salt for "+x"

This "off by one" buffer overflow has been introduced in commit 49385a98,
"Implemented hashed cloaked hostnames for +x".

11 years agoconfigure.in: Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER
Alexander Barton [Sat, 11 Aug 2012 14:29:14 +0000 (16:29 +0200)]
configure.in: Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER

AM_CONFIG_HEADER is marked obsolete and will be removed in Automake 1.13.

11 years agoTests and documentation for xop
Sebastian Köhler [Sun, 5 Aug 2012 21:38:47 +0000 (23:38 +0200)]
Tests and documentation for xop

11 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

11 years agoFix compiler warning when not building with ZLIB support
Alexander Barton [Sun, 5 Aug 2012 23:35:56 +0000 (01:35 +0200)]
Fix compiler warning when not building with ZLIB support

This fixes:

 irc.c: In function ‘Option_String’:
 irc.c:333:9: error: variable ‘options’ set but not used

11 years agoUpdate NEWS and ChangeLog files for hashed cloaked hostnames
Alexander Barton [Fri, 3 Aug 2012 21:55:25 +0000 (23:55 +0200)]
Update NEWS and ChangeLog files for hashed cloaked hostnames

11 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.

11 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

11 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

11 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

11 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

11 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.

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

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

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

11 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.

11 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.

11 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

11 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!

11 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

11 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.

11 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 ...

11 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

11 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.

11 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

11 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.

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

11 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"

11 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"

11 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.

11 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’

11 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’

11 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"

11 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

11 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.

11 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

11 years ago"multi-prefix" capability 2/2: adjust NAME and WHO handlers capabilities
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>

11 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!

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

11 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}

11 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().

11 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)

11 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