13827 Commits

Author SHA1 Message Date
Peter Powell
6d09b12be1 Don't sync filters defined in the config and expire them on rehash.
Closes #1202.
2018-09-25 10:45:33 +01:00
Peter Powell
c6e40d36b4 Merge branch 'insp20' into master. 2018-09-24 18:25:06 +01:00
Peter Powell
cae87fa047 Switch all core modules still using COMMAND_INIT to MODULE_INIT. 2018-09-23 14:19:06 +01:00
Peter Powell
876b1ae4e2 Don't sync xlines defined in the config and expire them on rehash.
Closes #1427.
2018-09-23 13:35:15 +01:00
A_D
f020429fd3 Make kicknorejoin respect /INVITE (#1514). 2018-09-23 13:12:05 +01:00
Peter Powell
0378d0f582 Merge m_noctcp_user into m_noctcp. 2018-09-18 12:30:15 +01:00
Peter Powell
548def5860 Fix gateway client hosts not being updated if DNS resolution fails. 2018-09-18 10:48:02 +01:00
Peter Powell
de4e486009 Improvements and bugfixes to the cgiirc module.
- Allow the ident for ident type hosts to be set in the config.
- Consistently check clone counts, connect classes, and xlines for
  all users regardless of their cgiirc host type.
- Remove some obsolete code from when gateway clients had their IP
  changed in OnCheckReady.
- Don't allow a gateway client to match both a WebIRC and an ident
  host.
2018-09-17 22:32:42 +01:00
Peter Powell
9a312de26b Improvements to the hostchange module.
- Get rid of <host> and merge the prefix and suffix values into the
  <hostchange> value.
- Remove the 'suffix' action. This has been replaced by the 'set'
  action.
- Add the 'addaccount' action. This adds the users account to their
  hostname.
- Use the <hostname:charmap> characters when removing invalid chars
  in addnick mode.
- Allow multiple entries on each hostmask so that they can fall
  through if a certain value is not acceptable.

Closes #816.
Closes #1001.
2018-09-16 12:38:14 +01:00
Peter Powell
7e9ec8e490 Amend OnPostCommand to specify whether the command is loopcalled.
This restores previous behaviour which was lost when the original
line parameter was removed.
2018-09-11 09:03:47 +01:00
Peter Powell
923d811b05 Add a module for hiding mode changes from unprivileged users.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-09-09 16:52:54 +01:00
Peter Powell
8512726adf Remove the ripemd160 module.
The library code used by this module is licensed under a non-free
license which is incompatible with the GPLv2. Combined with the
fact that it has been superceded by better algorithms like bcrypt
I have decided to remove it.

An alternate implementation of this algorithm is provided by the
m_hash_gnutls module if people *really* need to use it.
2018-09-06 13:31:53 +01:00
Peter Powell
33180223e3 Don't update the idle timer when a user replies to a CTCP.
Closes #1305.
2018-08-26 11:33:23 +01:00
Peter Powell
4567a325b8 Implement proper CTCP parsing in MessageDetails. 2018-08-26 11:33:19 +01:00
Peter Powell
9d1b92d927 Improve the snotices sent out by the filter module.
- Switch to a module-specific snotice character (f).
- Redo the format of the message to be easier to read and include
  the filter that the user matched.

Closes #490.
Closes #841.
2018-08-24 13:52:23 +01:00
Peter Powell
5a30926e2b Allow unlocking jumpserver and lockserv with a module rehash.
Closes #282.
2018-08-24 12:30:09 +01:00
Peter Powell
69f70c16d0 Document the --nopid option in the manual pages. 2018-08-24 12:08:56 +01:00
Peter Powell
b5bc17fba3 Send the 001-004 numerics and MOTD/LUSERS from core_info.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-22 21:25:55 +01:00
Peter Powell
bc4751a327 Fix warnings about using std::auto_ptr on C++11 or newer. 2018-08-21 15:47:46 +01:00
Peter Powell
71c367f89f Fix a few things that should be marked as override but aren't. 2018-08-21 15:47:45 +01:00
Peter Powell
e7c182c4a5 Release v3.0.0 alpha 9. v3.0.0a9 2018-08-15 16:01:24 +01:00
Peter Powell
b2ac8cc0a6 Merge branch 'insp20' into master. 2018-08-15 16:00:25 +01:00
Peter Powell
29215f99bc Rewrite m_httpd_config.
- Send the configuration as plain text instead of HTML.
- Show the location where each tag was located in a comment.
- Indent configuration keys consistently so they are easy to read.
2018-08-15 11:19:24 +01:00
Peter Powell
c5c5a867d2 Fix aliases that resolve to messages echoing with echo-message.
Fixes #1459.
2018-08-15 08:58:06 +01:00
Peter Powell
be0c4f6a3c Fix m_alias not reconstituting the RFC message properly. 2018-08-15 08:58:06 +01:00
Peter Powell
a69f543be3 Fix a bunch more conflicting/unnamed numerics. 2018-08-14 19:31:26 +01:00
Peter Powell
95a701b9d8 Convert CLONES to use its own numeric and batch the replies. 2018-08-14 19:03:15 +01:00
Peter Powell
712313ae7c Fix some bugs in cidr_mask::str().
- Fix a missing break statement causing unintentional fallthrough.
- Cast the length to an int to avoid interpreting as a character.
2018-08-14 18:59:07 +01:00
Peter Powell
188acfed6f Convert m_bcrypt to use a vendored library instead of bundling. 2018-08-14 15:48:43 +01:00
Peter Powell
7d4f8960f8 Add support for vendoring dependencies. 2018-08-14 15:48:39 +01:00
Peter Powell
f7a115884f Rename OnChangeLocalUserHost to OnPreChangeHost for consistency. 2018-08-14 00:22:59 +01:00
Peter Powell
10b17a0e9f Remove the OnInfo event.
This is not used by anything and On{Post,Pre}Command hooks can
be used if people really want to add stuff to INFO.
2018-08-14 00:18:13 +01:00
Peter Powell
23e29119f8 Replace all references to IRCv3.2 with IRCv3.
IRCv3 no longer does versioned releases.
2018-08-13 22:06:39 +01:00
Peter Powell
584d456903 Add support for the IRCv3 batch specification.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 22:01:42 +01:00
Peter Powell
2249524355 Add support for the IRCv3 server-time specification.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 22:01:21 +01:00
Peter Powell
c60f88bb5c Add support for the IRCv3 account-tag specification.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 21:51:12 +01:00
Peter Powell
58a0a7e014 Implement IRCv3 message tag support.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 21:51:11 +01:00
Peter Powell
e2a820cce2 Add an accessor for the last mode change list to ModeParser.
GetLastParse will be going away soon.
2018-08-13 16:52:37 +01:00
Peter Powell
ba23c2b115 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.
2018-08-12 15:01:45 +01:00
Peter Powell
f8a9b6ba4a Pass the Extensible container to ExtensionItem::free(). 2018-08-12 13:29:09 +01:00
Peter Powell
02838a0939 Move message parsing to ProcessBuffer and fix edge cases in it. 2018-08-10 20:04:56 +01:00
Peter Powell
8b418f081f Split irc::tokenparser::GetToken into GetMiddle and GetTrailing.
This simplifies the logic of irc::tokenparser considerably and
removes all of the magic index guessing that was used previously.
2018-08-10 13:55:32 +01:00
Peter Powell
aa6912f1c9 Remove the integer overloads of irc::tokenparser::GetToken().
The int overload was never used and the long overload was used in
one place.
2018-08-10 13:55:32 +01:00
Peter Powell
36899e44ee Parse CAPAB CAPABILITIES and FJOIN messages with spacesepstream.
Special tokenisation rules are not necessary here.
2018-08-10 13:55:32 +01:00
Peter Powell
213e4d9680 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.
2018-08-10 13:55:32 +01:00
Peter Powell
0218d32903 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.
2018-08-10 10:30:33 +01:00
Peter Powell
626003a7dc Switch m_xline_db to use the xline snomask character. 2018-08-10 06:40:26 +01:00
Peter Powell
090f381758 m_httpd: close the HTTP connection after serving a request.
We always send "Connection: Close" so this is the right behaviour
according to section 8.1 of RFC 2616.

Closes #1507.
2018-08-07 18:38:12 +01:00
Peter Powell
83a2eddaaa Switch m_dnsbl to use its own snomask character. 2018-08-07 16:50:01 +01:00
Peter Powell
c51d80d9d4 Remove the 'debug' snotice character. 2018-08-07 16:45:03 +01:00