Commit Graph

2849 Commits

Author SHA1 Message Date
Alexander Barton 1d3def0cc6 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")
2012-08-27 23:27:30 +02:00
Alexander Barton e01e8f1cb6 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"
2012-08-27 23:21:28 +02:00
Alexander Barton 186ab51137 Only allow IRC services to modify user mode "R" 2012-08-27 23:20:32 +02:00
Alexander Barton 74be904018 ngt_RandomStr(): : make it buildable with pre-ANSI C compilers 2012-08-27 22:42:52 +02:00
Alexander Barton 298cd9a327 Get_CAP_String(): make it buildable with pre-ANSI C compilers 2012-08-27 22:42:04 +02:00
Alexander Barton 414bfe65eb Enhance "NOTICE AUTH": show hostname and IDENT reply 2012-08-27 22:05:55 +02:00
Alexander Barton c519ba9920 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"
2012-08-27 21:22:58 +02:00
Alexander Barton fee8ff37b3 Add new channel mode "M" to doc/Modes.txt 2012-08-27 21:17:49 +02:00
Alexander Barton fee591b759 Remove Can_Send_To_Channel_Identified()
Move the functionality directly into Can_Send_To_Channel() function.
There should be no functional change ...
2012-08-27 21:15:12 +02:00
Brian Collins 16f94546f5 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.
2012-08-27 16:23:57 +01:00
Alexander Barton 55859c1bef 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
2012-08-26 19:42:08 +02:00
Alexander Barton bcefdef1ea 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.
2012-08-26 19:14:29 +02:00
Alexander Barton f79d41e927 Login_User(): use "conn" insted of calling Client_Conn(Client) 2012-08-26 19:11:44 +02:00
Alexander Barton 1680ea02da 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 ...
2012-08-26 19:07:38 +02:00
DNS777 1aaf54ac24 Implement channel mode "M"
Only the server, identified users and IRC operators are able to talk.
2012-08-26 16:40:49 +02:00
Alexander Barton a5984c702a Remove unused ERR_CANNOTSENDTOCHAN2_MSG message 2012-08-26 16:15:44 +02:00
DNS777 9a82304ae9 Add some more information to channel error numerics 2012-08-26 16:14:40 +02:00
Alexander Barton a26e37b746 Add new user mode "B" to doc/Modes.txt 2012-08-26 16:03:00 +02:00
DNS777 c2b39fdede Implement an Unreal-like user mode "B" ("Bot mode") 2012-08-26 15:58:37 +02:00
DNS777 8349a1c0d9 Recognize user mode "R"
This allows users to unset the user mode "R".
2012-08-26 15:30:49 +02:00
Alexander Barton 360a254be0 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).
2012-08-26 13:24:54 +02:00
Alexander Barton ab1fcebeff New function MatchCaseInsensitiveList() to check list of patterns 2012-08-26 13:11:45 +02:00
Alexander Barton a6dd2e33c2 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.
2012-08-26 12:33:21 +02:00
Alexander Barton 9d8974d509 Rename Conf_IsService() to Conf_NickIsService() 2012-08-26 12:27:51 +02:00
Alexander Barton 037b4b76df Check_Connections(): code cleanup 2012-08-26 12:04:40 +02:00
Brett Smith be97fa8ab1 Indentation and style fixes. 2012-08-23 14:18:15 -04:00
Brett Smith 164954a788 Connection password is not constant.
Saying otherwise makes a warning when we assign this to
conv.appdata_ptr in pam.c.
2012-08-23 13:59:17 -04:00
Brett Smith c1d7f6216f 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.
2012-08-23 12:24:34 -04:00
Brett Smith 7df4c12da9 Dynamically allocate memory for connection password. 2012-08-23 12:12:15 -04:00
Brett Smith 0d5de60584 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.
2012-08-23 11:07:08 -04:00
Alexander Barton 4b0f526006 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.
2012-08-22 00:50:15 +02:00
Alexander Barton 4cf65b973c "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.
2012-08-18 23:50:20 +02:00
Alexander Barton 160f728530 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
2012-08-18 16:01:51 +02:00
Alexander Barton 922540306e 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'
2012-08-18 12:34:11 +02:00
Alexander Barton d48e440a72 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".
2012-08-16 23:51:28 +02:00
Alexander Barton 0709a0f050 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.
2012-08-11 16:29:14 +02:00
Sebastian Köhler 097c72aa65 Tests and documentation for xop 2012-08-06 04:42:20 +02:00
Sebastian Köhler 7b01bb833f 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
2012-08-06 04:42:09 +02:00
Alexander Barton cfd0bddc30 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
2012-08-06 01:35:56 +02:00
Alexander Barton b53b12aa5f Update NEWS and ChangeLog files for hashed cloaked hostnames 2012-08-03 23:55:25 +02:00
Sebastian Köhler d0bb185cf5 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.
2012-08-03 04:10:11 +02:00
Sebastian Köhler 49385a98b2 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
2012-08-03 04:09:37 +02:00
Alexander Barton b9e6cb3e55 ngIRCd release 19.2 2012-06-19 11:47:15 +02:00
Alexander Barton dffe5a9d60 doc/Capabilities.txt: document "multi-prefix" capability 2012-06-13 12:19:56 +02:00
Alexander Barton d7eb343ea0 ngIRCd release 19.2~rc1 2012-06-13 11:40:24 +02:00
Alexander Barton bf5610a3b9 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.
2012-06-11 10:44:28 +02:00
Alexander Barton 7bce6780ca Update ChangeLog and NEWS files 2012-06-09 12:53:44 +02:00
Alexander Barton bf121ae95f Describe "CloakHostModeX" in sample-ngircd.conf an ngircd.conf(5) 2012-06-09 02:04:50 +02:00
Alexander Barton 7b6b492bdd Rename "CloakModeHost" option to "CloakHostModeX" 2012-06-09 01:58:40 +02:00
Christoph Biedl aa7db2c0e9 Introduce new configuration option "CloakModeHost"
This closes bug #124.
2012-06-09 01:58:25 +02:00