Commit Graph

73 Commits

Author SHA1 Message Date
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 6356418ae5 Change Introduce_Client() to set the correct client type (user/service). 2008-09-23 11:53:16 +02:00
Alexander Barton d93030ad27 Make real use of the CLIENT_SERVICE client type.
This patch enables ngIRCd to handle IRC services as real services, and not
as "fake users":

  - Set correct client type CLIENT_SERVICE for services,
  - Change log messages to include correct client type,
  - PRIVMSG: allow users to send messages to services,
  - Send services nick names to other servers (as users).

Please note that this patch doesn't announce services as services in the
network, but as regular users (as before). Only the local server knows
of services as services (see LUSERS command, for example). It is up to
one of the next patches to fix this and to introduce the SERVICE command
in server to server communication.

The propagation of services as regular users between servers doesn't limit
the functionality of the IRC services and will be the fallback for servers
that don't support "real" services propagation in the future.
2008-09-23 11:53:15 +02:00
Alexander Barton 4e125fb67c Allow IRC services to change their nick names. 2008-09-23 11:53:15 +02:00
Alexander Barton 02d7623074 Allow ngIRCd to detect services connected to an "virtual services server".
Introduce a new configuration variable "ServiceMask" in SERVER blocks to
define a mask matching nick names that should be treated as services.
Regular servers don't need this parameter (leave it empty, the default),
but you should set it to "*Serv" when connection ircservices, for example.

This patch allows ngIRCd to detect services, it doesn't change the
functionality: you only get different log messages ;-)
2008-09-23 11:51:16 +02:00
Alexander Barton c5342fb467 Centralize logging functions in Introduce_Client(). 2008-09-23 11:47:17 +02:00
Alexander Barton 557be8c56b Get rid of INTRO_INFO structure again: we don't need it at all!
All the required information is already stored in the CLIENT structure
of new new connection, so pass this to Introduce_Client() and don't
invent an unneeded new structure ...
2008-09-23 11:47:17 +02:00
Alexander Barton 92603f7c80 Introduce_Client(): send MODES in RFC 1459 mode, too. 2008-09-23 11:47:17 +02:00
Alexander Barton a60465be3e Server links: detect RFC 1459 mode direct after SERVER command
This patch allows ngIRCd to detect right after receiving the SERVER command
from the peer whether the RFC 1459 compatibility mode must be used or not.
And it fixes the announcement of users during establishing new server links
with such peers.
2008-09-23 11:47:17 +02:00
Alexander Barton 14048c4717 Send and handle NICK+USER commands for user registration (RFC 1459).
This patch enables ngIRCd to deal with NICK and USER commands following
RFC 1459 to register new clients, and to send these commands instead of one
full NICK command as specified in RFC 2813 on connections that are in RFC
1459 compatibility mode.

Can be useful for e. g. IRC services that simulate a RFC 1459 server.
2008-09-23 11:47:17 +02:00
Alexander Barton 4f759d8113 New function Introduce_Client() to announce new local and remote users. 2008-09-23 11:47:17 +02:00
Alexander Barton 6bc2d3d06e New connection option CONN_RFC1459.
This new connection option CONN_RFC1459 indicates that the peer on this
link only supports the IRC protocol as defined in RFC 1459 and that the
compatibility mode (e. g. for outgoing commands like NICK) should be used.
2008-09-23 11:47:17 +02:00
Alexander Barton 13f1d57e84 USER: servers and services can alter user information after registration.
This is required to do RFC 1459 style user registration on server links,
and is used by some services packages, too. See RFC 1459 section 4.1.3.
2008-09-23 11:47:16 +02:00
Alexander Barton 068d43352d NICK: allow servers and services to use RFC 1459 syntax (2 parameters).
This patch allows servers and services to call the NICK command using the
syntax defined in RFC 1459 to register new users, with only two parameters.
See section 4.1.2.

Useful for some services packages, which emulate this protocol.
2008-09-23 11:47:16 +02:00
Alexander Barton e56bd8ff89 Whitespace fixes: remove trailing tabulator characters. 2008-09-23 11:47:16 +02:00
Alexander Barton 956bbe2c28 Reset client idle time on NICK, JOIN, and PART 2008-05-24 21:50:54 +02:00
Alexander Barton 4e56e5341f Implement IRC commands SERVICE, SERVLIST, and SQUERY as dummy functions
SERVICE, SERVLIST, and SQUERY are required by RFC 2812 (it states in
section 3 that "all commands described in this section MUST be implemented
by any server for this protocol." -- So we implement them without (much)
actual functionality ...
2008-05-05 18:06:43 +02:00
Alexander Barton 33b1204349 Get rid of cvs-version.* and CVSDATE definition.
(cherry picked from commit b187fac244f4e14705f882ba7c43eef0238e2830)
2008-04-25 00:14:11 +02:00
Florian Westphal 42db159d26 Fix wrong strncpy usage if CVSDATE defined
Hello_User() used strncpy with overlapping src/dest.
Use memmove instead.
2008-02-26 23:49:33 +01: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
Alexander Barton ca5e09865e Removed an unused variable -- but where did it come from!? Strange ... 2006-10-03 10:28:38 +00:00
Alexander Barton 27d947fb7d Allow PASS syntax defined in RFC 1459 for server links, too.
Removed client status CLIENT_GOTPASSSERVER.
2006-10-01 19:05:00 +00:00
Alexander Barton bed98979dc Enhanced ISUPPORT message (numeric 005). 2006-10-01 19:03:05 +00:00
Florian Westphal 0eccdbc137 -whitespace damage 2006-08-12 11:56:24 +00:00
Alexander Barton a5b5a6a99a Make PONG handler compatible with ngIRCd <= 0.9 ("make it more relaxed"). 2005-09-01 10:51:24 +00:00
Alexander Barton 4074fd9149 Enhanced the handler for PING and PONG commands: fix forwarding and enable
back-passing of a client supplied additional argument of PING.
2005-08-28 11:40:13 +00:00
Florian Westphal 6434d0b23e return PING argument in PONG reply if STRICT_RFC is not defined. 2005-08-27 18:39:56 +00:00
Alexander Barton 77f54693ef Removed unnecessary #define of "LOCAL", now use plain C "static" instead. 2005-07-31 20:13:07 +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
Florian Westphal cac9f279fa send RFC compliant netsplit messages. 2005-06-04 12:32:09 +00:00
Alexander Barton 95f8b963a6 Reformatted and documented code of the first part of the IRC_NICK()
function; and register WHOWAS entries on nickname changes, too.
2005-05-17 23:24:43 +00:00
Alexander Barton f56a1bdf20 Use tabulator, not 8 spaces ... 2005-03-21 22:22:09 +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 cb76d96efb Fixed some warnings of non-gcc-compilers (e. g. original Apple compiler on
A/UX): "warning: illegal pointer combination, op =".
2004-03-11 22:16:31 +00:00
Alexander Barton 6667bb6b77 The info text ("real name") of users is set to "-" if none has been
specified using the USER command (e. g. "USER user * * :"). Reason:
the original ircd doesn't like empty ones and would KILL such users.
2004-02-04 19:56:04 +00:00
Alexander Barton 57c7e23622 Added #include for strings.h to fix compiler warnings. 2004-01-17 03:17:49 +00:00
Alexander Barton b79b315dd4 Added optional support for IDENT lookups (configure switch "--with-ident"). 2003-12-27 13:01:12 +00:00
Alexander Barton 05e2c0f048 Extended version reporting of CVS builds. 2003-12-04 14:05:16 +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 62796722f1 Changed all PACKAGE's to PACKAGE_NAME and all VERSION's to PACKAGE_VERSION. 2003-03-31 15:54:21 +00:00
Alexander Barton ff98833136 - Kill_Nick() uses an "faked internal KILL" now. 2003-01-08 22:28:12 +00:00
Alexander Barton c428ac7563 - Renamed RPL_FEATURE_MSG to RPL_ISUPPORT_MSG. 2003-01-02 17:55:28 +00:00
Alexander Barton ae6a7e7c0b - Fixed up command forwarding: only to servers! 2003-01-01 13:29:40 +00:00
Alexander Barton b8d7dcec77 - Adjusted includes for new "conn-func.h" header. 2002-12-30 17:15:42 +00:00
Alexander Barton a2544e496c - Cleaned up handling of server configuration structures. 2002-12-30 00:01:42 +00:00
Alexander Barton a3f59f1a5b - new numeric on login: RPL_FEATURE 2002-12-22 23:31:21 +00:00
Alexander Barton 490f28ffd1 - new file header format (in english);
- new file ident semantics.
2002-12-12 12:24:18 +00:00
Alexander Barton 9f122037ae - Logging von doppelten ID's verbessert. 2002-12-03 18:56:33 +00:00
Alexander Barton 0c471b84f7 - neues Source-Modul "irc-info"; neuer Befehl STATS. 2002-11-30 17:39:56 +00:00
Alexander Barton 1e59617d2c - Parser auf Befehlstabelle umgestellt. 2002-11-30 15:04:57 +00:00