Peter Powell [Sun, 12 Aug 2018 13:56:27 +0000 (14:56 +0100)]
Convert AWAY to use cross-module events and clean up slightly.
OnSetAway has been replaced with four events. OnUserPreAway and
OnUserPreBack can be used to deny an away state change and/or
change the away message of a local user. OnUserAway and OnUserBack
allow modules to be notified that a user's away state has changed.
Peter Powell [Thu, 9 Aug 2018 19:44:43 +0000 (20:44 +0100)]
Remove the original line parameter of On{Pre,Post}Command.
In the brave new world of message tags and alternate wire formats
this is no longer something that is appropriate to expose.
In reality it was only ever used by m_alias which now reconstitutes
the command name and parameters into a RFC 1459-style message for
whatever it needs to do.
Peter Powell [Fri, 10 Aug 2018 09:25:40 +0000 (10:25 +0100)]
Fix sending malformed ERR_UNKNOWNCOMMAND messages in some cases.
This is not something the average user will encounter. It can only
happen if the user sends a message with preceding whitespace or a
prefix but no command name.
This is not something that should ever be seen in practise so we
just penalise the user and pretend nothing ever happened.
The previous code also contained undefined behaviour but it acted
sensibly on all compilers we support so it was not crashable.
Peter Powell [Mon, 30 Jul 2018 23:49:27 +0000 (00:49 +0100)]
Remove support for static modules.
This has been frequently broken in the past and as far as I know is
used by literally nobody.
Also, even if all modules are compiled into the core any libraries
linked against are and have always been linked dynamically making
this unusable on platforms without dynamic libraries.
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).