Commit Graph

82 Commits

Author SHA1 Message Date
Alexander Barton c5beca8aab Limit list replies of LIST, WHO, WHOIS, and MAX_RPL_WHOWAS
Introduce new #define's MAX_RPL_LIST(100), MAX_RPL_WHO(25),
MAX_RPL_WHOIS(10), and MAX_RPL_WHOWAS(25).
2012-01-06 20:06:25 +01:00
Alexander Barton 9260759cec DEFAULT_WHOWAS->DEF_RPL_WHOWAS; MAX_CMODES_ARG->MAX_HNDL_MODES_ARG
To streamline naming, in preparation for MAX_RPL_WHO and MAX_RPL_WHOWAS :-)
2012-01-06 18:57:31 +01:00
Alexander Barton c2ac1ad3ba defines.h: Code cleanup and (a little bit) more documentation 2012-01-06 18:25:10 +01:00
Alexander Barton 98493077a2 channel modes: only handle MAX_CMODES_ARG modes with arguments
Limit the MODE command to handle a maximum of MAX_CMODES_ARG (5) channel
modes that require an argument (+Ibkl) per call.

Please note: Further modes that require arguments are silently ignored
and end the handling of any further modes.
This is similar to the behavior of ircd2.11 (silently ignores but seems
to handle other modes) as well as ircd-seven (silently ignores but handles
some(!) other modes) ...
2012-01-06 17:27:29 +01:00
Alexander Barton 60812b6fdf defines.h: fix comment: "lenth" -> "length"
Reported by Christoph Biedl in #ngircd. Thanks!
2011-11-05 00:35:18 +01:00
Alexander Barton 8aac366802 Implemented user mode "R" and channel mode "R"
- User mode "R": indicates that the nick name of this user is "registered".
   This mode isn't handled by ngIRCd itself, but must be set and unset by
   IRC services like Anope.

 - Channel mode "R": only registered users (having the user mode "R" set)
   are allowed to join this channel.
2011-08-26 15:26:38 +02:00
Alexander Barton ea725b99b7 Enlarge client user mode buffer, reduce client flags buffer
We have to enlage our user mode buffer, so we can handle even unknown
user modes in the future; and reduce the client flags buffer, because
I can't imagine why we ever would need ~100 flags!?

Now we support up to 15 user modes (was: 8) and up to 15 flags (was: 99).

So in the end, we even save 99-15+8-15=77 bytes for each client structure!
2011-08-01 21:28:55 +02:00
Alexander Barton 2a7dd06ebd Code cleanup: mostly removing empty lines 2011-02-13 17:52:38 +01:00
Alexander Barton f732c7117e Make write buffers bigger, but flush early
This patch
 - makes the server write buffer bigger: 64k,
 - makes the regular write buffer bigger: 32k,
 - tries to flush the write buffer starting at 4K.

Before this patch, a client got disconnected if the buffer flushing at 4k
failed, now regular clients can store up to 32k and servers up 64k even
if flushing is not possible at the moment (e.g. on slow links).
2011-02-12 23:24:56 +01:00
Alexander Barton a57748e1a1 Implement channel mode 'O': "IRC operators only"
This channel mode is used on DALnet (bahamut), for example.
2011-01-10 12:15:05 +01:00
Alexander Barton 4a6d44dce2 Remove support for ZeroConf/Bonjour/Rendezvous service registration 2011-01-09 23:51:30 +01:00
Alexander Barton 2a4bf67aac Implement user mode "x": hostname cloaking (closes: #102)
When a client has user mode "x" set, its real hostname is cloaked
by substituting it with the server name (as configured in ngircd.conf).

Restricted clients (user mode "r") aren't allowed to change mode "x".

Please note that hostname cloaking is only in effect in server-client
communication! The server still uses the real hostname for its own
logging and for all server-server communication -- therefore all servers
in the network must support user mode "x" to prevent older servers
from leaking the real hostname of a cloaked client!
2010-08-17 21:05:06 +02:00
Florian Westphal 056de78e31 ngircd: change MOTD file handling
previously, the given MotdFile file was read whenever a client
requested it.

Change handling to read the MotdFile contents into memory once
during config file parsing.

Two side effects:
- changes to the MOTD file do not have any effect until ngircds
  configuration is reloaded
- MOTD file does no longer have to reside in the chroot directory
  (the MOTD contents will then not be re-read on reload in that case)
2010-08-12 21:46:47 +02:00
Alexander Barton f76e0a1db6 Implement user mode "c": receive connect/disconnect NOTICEs
Users having the user mode "c" set receive NOTICE messages on each
new client connection to the local server as well as disconnects.
Only IRC operators (users having the mode "o" set) are allowed to
set the 'c' user mode.

These connect/disconnect messages can be useful for open proxy
scanners -- BOPM (http://wiki.blitzed.org/BOPM) is now functional
with ngIRCd, for example.
2010-06-25 00:33:01 +02:00
Alexander Barton 9f58418765 Implemented new "secure clients only" channel mode: +z
Only clients using a SSL encrypted connection to the server are
allowed to join such a channel.

But please note three things:

a) already joined clients are not checked when setting this mode,
b) IRC operators are always allowed to join every channel, and
c) remote clients using a server not supporting this mode are not
   checked either and therefore always allowed to join.
2010-01-17 14:20:07 +01:00
Alexander Barton 3a2ac66f7f Added missing modes to USERMODES #define
Now the numeric 004 correctly reports all the supported user and channel
modes (user modes "r" and "w" were missing), e. g.:

  :a.irc.net 004 a a.irc.net ngircd-15 aiorsw biIklmnoPstv
2010-01-16 14:07:27 +01:00
Florian Westphal 28ca31e576 Remove limit on max number of configured irc operators. 2009-11-07 17:42:54 +01:00
Florian Westphal dc9f42dc3c defines.h: remove MAX_LISTEN_PORTS, MAX_SERVICES
_SERVICES was never used; _LISTEN_PORTS is a leftover from
commit 51ccb5928a
('internal changes needed for future ssl support').
2008-12-27 23:51:52 +01:00
Florian Westphal a971047bc5 Remove limit on max number of predefined channels.
This resolves Bugzilla Bug 68 ('Too many pre-defined channels configured.')
2008-12-26 01:07:56 +01:00
Alexander Barton 178f9cbdac Announce IRC services in the network.
This patch
 - introduces a new server flag "S" to indicate that the server can handle
   the SERVICE command (on server links),
 - implements the IRC command "SERVICE" for server-server links,
 - uses the "SERVICE" command to announce IRC services when a new
   server connects to it,
 - and fixes the Send_Message() function to let it send messages to
   services using a "target mask".

If the remote server doesn't indicate that it can handle the "SERVICE"
command (it has not set the "S" flag), services are announced as regular
users as before.
2008-09-23 11:53:16 +02:00
Alexander Barton 47ca178a21 Introduce option to configure the maximum nick name lenth in ngircd.conf
- New configuration option "MaxNickLength" to specify the allowed maximum
  length of user nick names. Note: must be unique in an IRC network!
- Enhanced the IRC+ protocol to support an enhanced "server handshake" and
  enable server to recognice numeric 005 (ISUPPORT) and 376 (ENDOFMOTD).
  See doc/Protocol.txt for details.
2007-11-21 12:16:33 +00:00
Florian Westphal 4b9e52eb4d implement /WALLOPS as described in RFC 2812, section 4.7. 2007-08-02 10:14:26 +00:00
Alexander Barton 255edf7eab Reworked read and write buffer handling, introduced WRITEBUFFER_SLINK_LEN. 2007-05-17 23:34:24 +00:00
Florian Westphal 09416f36bf remove ZBUFFER constants and increase max buffer size of server links 2007-05-09 08:55:14 +00:00
Alexander Barton e9e1fa459b Sorted channel modes alphabetically. 2006-06-15 20:28:15 +00:00
Alexander Barton ca32c1b311 Implementec numeric "333": Time and user name who set a channel topic. 2005-09-02 12:50:25 +00:00
Florian Westphal 84706af7fe topic no longer limited to 127 chars (now only limited by protocol) 2005-07-28 16:23:55 +00:00
Alexander Barton 02b0a51517 Renamed "Rendezvous" to "Zeroconf". 2005-07-08 16:18:38 +00:00
Alexander Barton e5a19fa3a0 Fixed maximum length of user names, now allow up to 9 characters. 2005-07-05 22:44:47 +00:00
Alexander Barton 43d644ed92 Code and comment cleanups, new #define "CUT_TXTSUFFIX". 2005-07-02 14:33:45 +00:00
Alexander Barton 9f247ebd5a New defines MAX_WHOWAS and DEFAULT_WHOWAS. 2005-05-16 12:22:32 +00:00
Florian Westphal 8adff59223 Remove INT, LONG, BOOLEAN, STATIC, CONST, CHAR datatypes.
use stdbool.h / inttypes.h if available.
2005-03-19 18:43:48 +00:00
Alexander Barton 4ef172d603 Implemented support for "secret channels" (channel mode "s"). 2005-03-02 16:35:10 +00:00
Alexander Barton 112102b10c New configuration variable "PidFile", section "[Global]": if defined,
the server writes its process ID (PID) to this file. Default: off.
Idea by Florian Westphal, <westphal@foo.fh-furtwangen.de>.
2005-02-04 14:24:20 +00:00
Alexander Barton 26b0ddf200 Translated source code comments. 2005-01-17 13:14:36 +00:00
Alexander Barton b6690df2be Raised the maximum length of passwords to 20 characters. 2005-01-17 13:01:34 +00:00
Alexander Barton 7281b8dd4d New "chroot" feature (from Benjamin Pineau), introducing new configuration
variables "ChrootDir" and "MotdPhrase".
2004-05-07 11:19:20 +00:00
Alexander Barton d433eb3896 Add flag "L" to default IRC+ server flags: synchronize INVITE-
and BAN-lists.
2004-04-25 15:46:50 +00:00
Alexander Barton c40592d2ce Removed "USE_" prefixes of configuration #defines. 2003-12-26 15:55:07 +00:00
Alexander Barton 7b6e26628a Fixed and enhanced penalty handling; changed internal time resoluiton of
the server to one second. Code cleanup.
2003-11-05 23:24:48 +00:00
Alexander Barton f179070113 - New constant RENDEZVOUS_TYPE. 2003-02-23 12:03:39 +00:00
Alexander Barton 3c738ed46d - definition of CONFIG_FILE and MOTD_FILE is now compatible with -Wtraditional. 2002-12-26 13:17:56 +00:00
Alexander Barton 8d024d05d2 - new constant MAX_SERVICES,
- added k and l modes to CHANMODES.
2002-12-16 23:10:56 +00:00
Alexander Barton c7f075236b - new file header format (in english). 2002-12-12 12:23:43 +00:00
Alexander Barton e93f545c74 - "Text-Prefix" fuer Server-Notices auf "" gesetzt. 2002-11-29 17:38:17 +00:00
Alexander Barton 65f3adca21 - Unterstuetzung fuer komprimierte Server-Server-Links implementiert. 2002-11-26 23:07:24 +00:00
Alexander Barton 57bc0d7895 - neue Konstante TIME_RES: "Zeitaufloesung" des Servers. 2002-11-23 16:08:18 +00:00
Alexander Barton 8eac8bcbfc MAX_CONNECTIONS durch CONNECTION_POOL ersetzt. 2002-11-02 22:57:41 +00:00
Alexander Barton bd645f5095 - neue Konstante NOTICE_TXTPREFIX. 2002-10-09 13:15:45 +00:00
Alexander Barton 60df88777e - IRC+-Protokoll ist nun abschaltbar.
- neue Konstante PROTOIRC.
2002-09-07 17:58:00 +00:00