Peter Powell [Thu, 12 Jul 2018 13:30:59 +0000 (14:30 +0100)]
Implement support for the WHOX extension.
This is a massive rewrite of core_who which was initially developed
by Adam in 2014. I have rebased and cleaned it up and tightened up
compliance with the specifications.
Chris Novakovic [Mon, 4 Jun 2018 11:40:32 +0000 (12:40 +0100)]
Add --nopid command line option (#1497).
Add a --nopid command line option, which causes a PID file not to be
written to the file system regardless of the presence of the <pid> tag
in the configuration file or the value of its "file" variable if it is
present.
Peter Powell [Thu, 29 Mar 2018 18:04:11 +0000 (19:04 +0100)]
Improve support for MOTD escape codes.
- Implement escapes for italic, monospace, and strikethrough.
- Use the escape codes in the example MOTDs to demonstrate their
formatting effects.
- Remove support for octal escape codes. In modern computing octal
is rarely used and is confusing for users who might confuse it
for decimal.
Peter Powell [Sun, 22 Apr 2018 12:31:00 +0000 (13:31 +0100)]
Replace ERR_{NOCTCPALLOWED,WORDFILTERED} with ERR_CANNOTSENDTOCHAN.
There is no reason for these responses to have their own numerics
when other modules do not. The only thing this does is make life
harder for client developers.
Peter Powell [Thu, 15 Feb 2018 11:30:57 +0000 (11:30 +0000)]
Rewrite m_denychans.
- The configuration is now validated on ReadConfig and parsed into
objects.
- Allow redirecting to channels that don't yet exist. There is no
technical reason to not allow this and I believe that it would
be a lot less confusing to users if we allowed this.
Peter Powell [Mon, 16 Apr 2018 16:02:42 +0000 (17:02 +0100)]
Call OnUserMessageBlocked when a PRIVMSG or a NOTICE is blocked.
This is necessary to allow m_ircv3_echomessage to pretend that a
message was echoed successfully. This is useful as it doesn't let
spammers know that their message was blocked.
Matt Schatz [Mon, 16 Apr 2018 09:02:49 +0000 (03:02 -0600)]
Improve some documentation (#1483).
* Improve exemptchanops in inspircd.conf.example (<options>)
and modules.conf.example; along with both helpop examples.
* Add "the" to all "requires X module" in both helpop examples.
* Refer to customprefix instead of chanprotect and halfop.
* Add SNOMASK 'r' and 'R' (OPERLOG) to both helpop examples.
* Clean up unnecessarily split SNOMASK lines in both helpop examples.
* Move chmode 'g' to be in alphabetical order in both helpops examples.
* Specify the needed mask formats for TLINE in helpop-full example.
* Remove extra '\' in RLINE mask format in helpop-full example.
Force xml format in helpop-full
* Generalize "color codes" to "formatting codes"
* Fix file name in include for example helpop-full
Within the example configs, helpops, some server sent messages, and
simple code comments: change the primary usage of "gecos" to
"real name" (or "realname" where fitting).
Daniel Vassdal [Sat, 21 Feb 2015 10:50:09 +0000 (11:50 +0100)]
m_sqlauth: Allow specifying what hash algos to provide hashes from.
Defaults to md5,sha256 to be compatible with old configs.
Adds new parameter `kdf`. If this is set (to e.g. bcrypt), the hash
will be compared locally. This requires the password column to be
specified in <sqlauth:column>.
genius3000 [Mon, 26 Mar 2018 11:57:22 +0000 (05:57 -0600)]
Fix ELine::Matches returning false on existing match
When checking for an E-Line match, we want to actually check for a
current match even if we previously matched and are set exempt.
This fixes situations where you have an E-Lined CGI:IRC address,
a G-Lined IP range for some area/host/etc and a smaller E-Lined
IP range for known good clients. Currently when CGI:IRC changes
the IP, E-Lines are rechecked but because the user is already exempt
(from the CGI:IRC E-Line), they are set no longer exempt and match
a G-Line, when they should match an E-Line.
This exact change has been done before in commit 'c8b344e' and shortly
reverted in 'c490a90' to fix issue #989 (CGI:IRC users remaining exempt
when the CGI:IRC address is E-Lined but they are not).
The actual cause to this issue was likely that the user's hostname was
not changed from the CGI:IRC hostname/IP prior to rechecking E-Lines.
This is being fixed in a separate commit.
Peter Powell [Mon, 26 Mar 2018 11:52:35 +0000 (05:52 -0600)]
Set User::host before calling ChangeIP()
ChangeIP() calls SetClientIP() which revalidates whether the user
matches an ELine. However, because the hostname has not changed yet
the user may incorrectly be marked as non-exempt.
Validate settings in order in ValidateSettings() (#1475).
* Validate the settings in the same order as the parameter syntax
* Always validate Lines and Secs regardless of having a Diff
* Check Backlog for greater than Max as well as being disabled
genius3000 [Fri, 30 Mar 2018 16:08:22 +0000 (10:08 -0600)]
Update the GeoIP ExtItem when CGI:IRC sets the real IP (#1471)
Since CGI:IRC calls it's 'ChangeIP()' either from 'OnCheckReady()'
or 'OnUserRegister()', both of which are called after the user has
sent NICK/USER, we can safely skip re-setting the ExtItem prior to
this point.
This skips the first 'OnSetUserIP()' from 'User::AddUser()' as
the 'OnSetConnectClass()' catch handles the initial setting.
Dylan Frank [Sun, 25 Mar 2018 16:02:00 +0000 (09:02 -0700)]
Separate secret and private channels on whois for non-opers (#1447)
Separate secret and private channels on WHOIS for all users.
- Move the config parsing from the core to core_whois.
- Replace <security:operspywhois> with an oper privilege.
- Introduce <options:splitwhois> to split WHOIS channel lists.
Peter Powell [Tue, 6 Feb 2018 15:01:30 +0000 (15:01 +0000)]
Send the ACCEPT and KEYLEN ISUPPORT tokens.
- The ACCEPT=[count] token specifies the maximum amount of nicks
which can be added to a m_callerid accept list. This token was
added by ircd-ratbox in 3.0.9.
- The KEYLEN=[length] token specifies the maximum length of a
channel key. This token was added by ircd-ratbox in 3.1 beta.
For more info see http://defs.ircdocs.horse/defs/isupport.html