summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2012-11-24Rework cloaked hostname handling, implement "METADATA cloakhost"Alexander Barton
Now ngIRCd uses two fields internally, one to store the "real" hostname and one to save the "cloaked" hostname. And both fields can be set independently using the "METADATA host" and "METADATA cloakhost" commands. This allows "foreign servers" (aka "IRC services") to alter the real and cloaked hostnames of clients without problems, even when the user itself issues additional "MODE +x" and "MODE -x" commands.
2012-11-24RPL_UMODEIS: send correct target name, even on server linksAlexander Barton
2012-11-24Client_HostnameCloaked() -> Client_HostnameDisplayed()Alexander Barton
2012-11-13Test suite: correctly execute tests when stdout is redirectedAlexander Barton
2012-11-12Add a few casts, fix compiler warnings on NetBSD 5Alexander Barton
This fixes a few warnings of this type: XXX.c: In function 'AAA': XXX.c:YY: warning: array subscription has type 'char' Tested on NetBSD 5.0.2 with gcc 4.1.3.
2012-11-11irc-info.c: Use strlcpy() instead of strcpy()Alexander Barton
This fixes the following warning of gcc (tested on OpenBSD 5.0:) irc-info.c:990: warning: strcpy() is almost always misused, please use strlcpy
2012-11-11conf.c: Use strlcpy() instead of strcpy()Alexander Barton
This fixes the following warning of gcc on OpenBSD 5.0: conf.c:728: warning: strcpy() is almost always misused, please use strlcpy()
2012-11-11tool.h: Don't check for and #define PF_INETAlexander Barton
This is correctly handled by ipaddr/ng_ipaddr.h today, and the check in tool.h isn't required any more -- and caused errors on OpenBSD 5.0: In file included from ./../tool/tool.h:23: /usr/include/arpa/inet.h:74: warning: "struct in_addr" declared inside parameter list
2012-11-11conf-ssl.h: Use "gnutls_session_t" instead of "gnutls_session"Alexander Barton
This fixes the following warning with current versions of GnuTLS: conf-ssl.h:36: warning: "gnutls_session" is deprecated
2012-11-10Add new IRC+ server flag "X": "XOP modes supported"Alexander Barton
This flag indicates, that the server supports the enhanced "xop channel user modes", like channel owner, admin, and halfop. This information is used to make sure that no unsupported CHANINFO commands are sent to servers not supporting such mode prefixes, for example.
2012-11-05Correctly add irc-metadata.{c|h} to Makefile.ng ...Alexander Barton
2012-11-05Generate "METADATA host" commands on "MODE +/-x"Alexander Barton
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-05Don't cloak already cloaked hostname when using METADATAAlexander Barton
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-05Implement METADATA command to update client metadataAlexander Barton
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-04PredefChannelsOnly: Fix message for non pre-defined channelsDNS777
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-04Test suite: add some "remote checks" to whois-test.eAlexander Barton
2012-11-04Send NICK commands with prefix of (target) userAlexander Barton
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-02Implement SVSNICK command to change remote nicknamesAlexander Barton
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-02IRC_NICK(): Code cleanup, new function Change_Nick()Alexander Barton
2012-11-02Spelling fix: "nick name" -> "nickname"Alexander Barton
2012-10-29Fix warning message introduced when cleaning up IRC_SERVER()Alexander Barton
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-29Make server reconnect time a little bit more randomAlexander Barton
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-29Don't accept connections for servers already beeing linkedAlexander Barton
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-29IRC_SERVER(): Code cleanupAlexander Barton
2012-10-29Use lowercase "package name" for syslog logging againAlexander Barton
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-25Make the maximum /list reply length a configurable limit.Brett Smith
2012-10-19Allow remote servers and IRC Ops to change channel topicsAlexander Barton
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-19Increased maximum number of possible user and channel modesDNS
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-19Update error messages for user mode +b and channel Mode +M.DNS777
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-15Test suite: add more checks to whois-test.eAlexander Barton
2012-10-11Disable UID/GID checks on "single user OS"Alexander Barton
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-08Test suite: add test for user mode "b"Alexander Barton
2012-10-08Implement user mode "b": block messagesDNS777
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-07Fix ERR_CANNOTSENDTOCHAN_MSG messageAlexander Barton
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-07WHOIS: show RPL_WHOISHOST_MSG to all IRC Ops in the networkAlexander Barton
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-06Test suite: make expect scripts more verboseAlexander Barton
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-06Test suite: remove indentation of messagesAlexander Barton
2012-10-06Merge branch 'bug141-ModesQq'Alexander Barton
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-06Show active user modes in WHOIS replyDNS777
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-06Implement channel mode 'V' (invite disallow)DNS777
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-06Allow channel admins to "de-admin" channel membersDNS777
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-06KICK-protect IRC servicesAlexander Barton
2012-10-06Merge branch 'bug109-CHARCONV'Alexander Barton
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-06Implement channel mode "Q" and user mode "q"Alexander Barton
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-06Fix spelling: ERR_CHANOPPRIVTOLOW_MSG -> ERR_CHANOPPRIVTOOLOW_MSGAlexander Barton
Thanks to DNS for pointing this out, see bug #126!
2012-09-27Test suite: don't use "mkdir -p"Alexander Barton
"mkdir -p" is not supported on all platforms. Tested with Apple A/UX 3.1.x.
2012-09-27ERR_CHANNELISFULL_MSG: better wordingFederico G. Schwindt
(cherry picked from commit 0fcfa7e00fa8e098dd3724c7188c88ac82a52881)
2012-09-27Fix getpid.sh to work on Apple A/UX againAlexander Barton
2012-09-27Send RPL_REHASHING if rehash was acceptedFederico G. Schwindt
(cherry picked from commit f1b171a09cd076f743a7fff221fa7aa752abb374)
2012-09-27Change variable name "SSLDHFile" to "DHFile" in log messagesFederico G. Schwindt
(cherry picked from commit d96db0a2e56d310177edb45d0a8b164a37992ab1)