Commit Graph

2824 Commits

Author SHA1 Message Date
Alexander Barton 45b0bb5aff Remove Anope "ngircd" protocol module patches
Starting with Anope 1.9.8, the ngIRCd protocol module is included in the
Anope distribution, so there's no longer any need to support our own (but
now heavily outdated!) patches. Therefore remove them.
2012-11-10 21:26:25 +01:00
Alexander Barton c7db2f8429 doc/Services.txt: Update documentation for Anope 1.9.8
Starting with Anope 1.9.8, the ngIRCd protocol module is rewritten from
scratch by "DukePyrolator" and included in the Anope distribution. So no
patching is required any more, yeah!

Drawback: Anope 1.9.8 is in development and not yet released ...
2012-11-10 21:24:55 +01:00
Alexander Barton f0b86e6c26 Correctly add irc-metadata.{c|h} to Makefile.ng ... 2012-11-05 23:57:14 +01:00
Alexander Barton 7871a904d7 doc/Protocol.txt: Document METADATA command 2012-11-05 23:51:52 +01:00
Alexander Barton 40e3daf560 Generate "METADATA host" commands on "MODE +/-x"
Use "METADATA host" commands to let servers supporting this command
know which (possibly cloaked) hostname is in effect for a specific
client. This prevents "double cloaking" of hostnames and even cloaked
hostnames are in sync on all servers supporting "METADATA" now.
2012-11-05 23:49:12 +01:00
Alexander Barton 44b7ff02fd Don't cloak already cloaked hostname when using METADATA
A client for which a METADATA command has been received from one of
its peers got the client flag "M" set. So it's safe to assume that
such a client gets "METADATA host" commands for its cloaked hostname
and the server must not cloak the hostname on its own, even when the
client mode "+x" is set.
2012-11-05 23:46:26 +01:00
Alexander Barton 35ed57e6c1 Implement METADATA command to update client metadata
The METADATA command can be used by other servers to update "metadata"
of registered clients, like the client info text ("real name"), user
name, and hostname:

  :<prefix> METADATA <target> <key> :<value>

It is distributed in the network, unknown <key> names are silently ignored
and passed on, too. This allows for further extensions.
2012-11-05 23:34:21 +01:00
Alexander Barton 79731a57f3 doc/Protocol.txt: add/fix CHARCONV description 2012-11-05 23:11:41 +01:00
DNS777 a7f37cebdc PredefChannelsOnly: Fix message for non pre-defined channels
If PredefChannelsOnly is enabled, and if someone tries to create
a channel which does not exist, then the error message is a 474.
The 474 Error message changed recently and does not match anymore:
'Cannot join channel (+b) -- You are banned'.

Changed the error message to numeric 403 'No such channel'.

Bug introduced by commit 9a82304a.

(cherry picked from commit 2c2e08f34187a33c1da745995c5f213e33a91410)
2012-11-04 20:38:36 +01:00
Alexander Barton 47b99c69cc Test suite: add some "remote checks" to whois-test.e 2012-11-04 19:50:02 +01:00
Alexander Barton 757f3497bc Send NICK commands with prefix of (target) user
Now NICK commands are always generated using the prefix of the target
user, even when the nickname change has been initiated by some other
(pseudo) server or using the SVSNICK command. In this case, the prefix
of the initiator has been used, but this isn't compatible with clients
(at least weechat and irssi don't handle such NICK commands correctly).
2012-11-04 18:01:49 +01:00
Alexander Barton f2455cbe33 Update doc/Services.txt, sort services alphabetically 2012-11-04 13:22:26 +01:00
Alexander Barton e3f300d323 Implement SVSNICK command to change remote nicknames
The SVSNICK command allows other servers (and services on
"pseudo-servers") to forcefully change nicknames of remote users.

Syntax: ":<from> SVSNICK <oldnick> <newnick>"

The SVSNICK command itself doesn't change the nickname, but it becomes
forwarded to the server to which the user is connected to. And then this
server initiates the real nickname changing using regular NICK commands.

This allows to still run networks with old servers not supporting the
SVSNICK command, because SVSNICK commands for nicknames on such servers
are silently ignored and don't cause a desync of the network.
2012-11-02 17:50:31 +01:00
Alexander Barton 497edbaf3e IRC_NICK(): Code cleanup, new function Change_Nick() 2012-11-02 14:36:29 +01:00
Alexander Barton 48326e061a Spelling fix: "nick name" -> "nickname" 2012-11-02 14:30:19 +01:00
Alexander Barton 84e9dcbab0 Xcode: correctly #define PACKAGE and PACKAGE_NAME 2012-11-02 14:16:58 +01:00
Alexander Barton 30b32e84fe Fix warning message introduced when cleaning up IRC_SERVER()
This reverts a not intentional code change and fixes the following compiler
warning message (tested with gcc 4.4.5):

 irc-server.c: In function "IRC_SERVER":
 irc-server.c:142: warning: suggest parentheses around operand of "!"
                            or change "&" to "&&" or "!" to "~"
2012-10-29 11:44:45 +01:00
Alexander Barton fb92493376 Make server reconnect time a little bit more random
Add randomly up to 15 seconds to the reconnect delay for outgoing server
links when the connection has been "short" and therefore the "ConnectRetry"
delay is being enforced.

This should make it even more unlikely that two servers deadlock each
other when both are trying to connect to the other one at the same time,
for example in test environments.
2012-10-29 11:33:49 +01:00
Alexander Barton eb4f9eac0c Don't accept connections for servers already beeing linked
If two servers try to link each other, there was a time frame that
could result in one connection overwriting the other, e. g. the incoming
connection overwriting the status of the outgoing one. And this could
lead to all kind of weirdness (even crashes!) later on.

So now such incoming connections are dropped. But this most probably
prevents the two servers from linking until timing changes somehow
(network latency?) because each server drops the incoming connection of
the other one, so no connection survives in the end.

But this has to be addressed by an other patch ...
2012-10-29 11:33:49 +01:00
Alexander Barton d7b5dd1bbf IRC_SERVER(): Code cleanup 2012-10-29 11:33:49 +01:00
Alexander Barton b18e81b631 Use lowercase "package name" for syslog logging again
This is how ngIRCd up to release 19.2 behaved; "bug" introduced by commit
67e882, "configure.in: require autoconf 2.67 and automake 1.11", which
changed the "PACKAGE_NAME" to "ngIRCd"; so use "PACKAGE" which still is
the lowercase version for initializing syslog logging.
2012-10-29 10:24:27 +01:00
Alexander Barton 8ff153d7d4 Document new configuration option "MaxListSize" 2012-10-28 20:36:58 +01:00
Brett Smith 32f63abb59 Make the maximum /list reply length a configurable limit. 2012-10-25 14:46:29 -04:00
Alexander Barton 23572af942 Update NEWS and ChangeLog files 2012-10-24 22:03:56 +02:00
Alexander Barton 8d9cfa157a Allow remote servers and IRC Ops to change channel topics
Remote servers are always allowed to change all channel topics,
and IRC Operators are allowed to change all channel topics if the
configuration option "OperCanUseMode" is enabled.

Bug introduced by commit 7b01bb8 and reported by DNS777.
2012-10-19 19:45:44 +02:00
DNS 58abd0777b Increased maximum number of possible user and channel modes
Currntly ngIRCd supports 13 user and 15 channel modes, because there
have been quite a few additions since our last release. But our data
structures can only hold 15 user and -- even worse! -- only 9 channel
modes! So enlarge the buffers to 20 bytes (actually 21 including NULL)
to allow storing of all mode characters and to have some space left
for more modes to come ...

(cherry picked from commit 8996d777621d88d4bcc439ab4792b2814920687f)
2012-10-19 18:44:15 +02:00
DNS777 3ee98d9f72 Update error messages for user mode +b and channel Mode +M.
Replaced error message for channel mode +M with ERR_NEEDREGGEDNICK_MSG
(used by Bahamut, inspircd, ircu & Unreal too) and using numeric 477
and the msg simliar like inspircd.

Replaced the error message ERR_CANNOTSENDTONICK_MSG for user mode +b
with ERR_NONONREG_MSG and using numeric 486, similar like unrealircd.

(cherry picked from commit 55a61ab17f63a9e757b7c7598c31b98ce5a132e8
and commit 3737d9ab7da1ea0485cefc07c65dc5308bf0db02)
2012-10-19 18:38:46 +02:00
Alexander Barton b1a5ade88f Test suite: add more checks to whois-test.e 2012-10-15 21:39:08 +02:00
Alexander Barton 73229249d8 Add "i586/pc/haiku" to doc/Platforms.txt 2012-10-11 15:05:21 +00:00
Alexander Barton e0da56fc7b Disable UID/GID checks on "single user OS"
Don't abort on "single user operating systems" that don't know more than
one user account and therefore can't change user and group IDs.

Currently, the only such system supported by ngIRCd is Haiku, a BeOS
clone.
2012-10-11 14:54:13 +00:00
Alexander Barton cdaaae0cb2 Search gethostbyname() in libbind and libnetwork
This is required for Haiku (BeOS clone) at least.
2012-10-11 14:50:45 +00:00
Alexander Barton c319fb8eaa Update manual pages
Among other little things, bring project description in line with website.
2012-10-09 13:13:01 +02:00
Alexander Barton 538e612a47 Test suite: add test for user mode "b" 2012-10-08 12:15:34 +02:00
DNS777 9d97004a28 Implement user mode "b": block messages
When a user has set mode "b", all private messages and notices to this
user are blocked if they don't originate from a registered user, an IRC Op,
server or service. The originator gets an error numeric sent back in this
case, ERR_CANNOTSENDTONICK_MSG(976), which is/was(?) used by KineIRCd, too.

This closes bug #144.
2012-10-08 12:11:04 +02:00
Alexander Barton 87deb43012 Fix ERR_CANNOTSENDTOCHAN_MSG message
This error message is not only used if one can not send to a channel
because it is moderated, but for _all_ reasons when a message can not
be delivered (moderated, banned, no external messages, ...), so strip
the "(+m) -- Moderated" part of the error message again.

Bug introduced by commit 9a82304a.
2012-10-07 15:11:05 +02:00
Alexander Barton a9cbb375b7 Shorten filenames of Anope protocol module patchfiles
Filenames have been too long and couldn't be stored in all tar
archive formats ...
2012-10-07 12:06:11 +02:00
Alexander Barton 161adbb1aa WHOIS: show RPL_WHOISHOST_MSG to all IRC Ops in the network
Not only show RPL_WHOISHOST_MSG to local IRC opreators, but show
it to all IRC operators in the network. And don't show it to anybody
if the "more privacy" configuration option is enabled.

This closes bug #134.
2012-10-07 00:05:25 +02:00
Alexander Barton de2fa78d92 Test suite: make expect scripts more verbose
Now tests.sh transforms each expect script it executes using sed(1)
and inserts a 'puts -nonewline stderr "."' in front of each "expect"
command.
2012-10-06 23:17:07 +02:00
Alexander Barton 8bede388af Test suite: remove indentation of messages 2012-10-06 23:17:06 +02:00
Alexander Barton c9d166747d Merge branch 'bug141-ModesQq'
This closes bug #141.

* bug141-ModesQq:
  KICK-protect IRC services
  Implement channel mode "Q" and user mode "q"

Conflicts:
	src/ngircd/defines.h
	src/ngircd/messages.h
2012-10-06 22:37:57 +02:00
DNS777 56cdc2175c Show active user modes in WHOIS reply
Implement numeric RPL_WHOISMODES_MSG(379) and show user modes in the
reply of the WHOIS command for the user himself or, if MorePrivacy
isn't set, for request initiated by an IRC operator.

Numeric 379 is used by Unreal and InspIRCd for this purpose, too.

Closes bug #129.
2012-10-06 21:56:59 +02:00
DNS777 de453d71cb Implement channel mode 'V' (invite disallow)
If the new channel mode "V" is set, the INVITE command becomes invalid
and all clients get the new ERR_NOINVITE_MSG(518) reply.

Unreal and InspIRCd uses this mode, too.

This closes bug #143.
2012-10-06 20:49:35 +02:00
DNS777 23b07bdf50 Allow channel admins to "de-admin" channel members
This patch fixes unsetting of channel user mode "+a" (channel admin)
and adds a better error message: without this patch, a channel admin is
unable to unset this mode.

This closes bug #142.
2012-10-06 19:52:15 +02:00
Alexander Barton 9ac94339dc KICK-protect IRC services 2012-10-06 19:23:05 +02:00
Alexander Barton 46b0eef721 Merge branch 'bug109-CHARCONV'
This closes bug #109.

* bug109-CHARCONV:
  Debian: require "telnet" or "telnet-ssl" for building
  Debian ngircd-full[-dbg]: enable CHARCONV
  Add "CHARCONV" to "feature string" when enabled
  Implement new IRC+ "CHARCONV" command
  Added new configure option "--with-iconv"

Conflicts:
	src/ngircd/messages.h
2012-10-06 18:26:25 +02:00
Alexander Barton d3ae351236 Implement channel mode "Q" and user mode "q"
Both modes protect users from channel kicks: only IRC operators and
servers can kick users having mode "q" or in channels with mode "Q".

Original patch by DNS777 <dns@rbose.org>, thanks!

This closes bug #141.
2012-10-06 18:13:01 +02:00
Alexander Barton 4790d78c98 Define HAVE_SETSID for Mac OS X Xcode builds 2012-10-06 17:58:44 +02:00
Alexander Barton c66e20ce6e Fix spelling: ERR_CHANOPPRIVTOLOW_MSG -> ERR_CHANOPPRIVTOOLOW_MSG
Thanks to DNS for pointing this out, see bug #126!
2012-10-06 17:21:32 +02:00
Alexander Barton 343a90dc37 Debian: require "telnet" or "telnet-ssl" for building 2012-10-06 16:36:34 +02:00
Alexander Barton 09ab0704f4 Debian ngircd-full[-dbg]: enable CHARCONV 2012-10-06 16:36:07 +02:00