3005 Commits

Author SHA1 Message Date
Peter Powell
7b6f7dcde5 Move <security:hidekills> into core_oper. 2018-10-01 17:26:22 +01:00
Peter Powell
680ecdae0c Document ServerConfig::Conf{Tags,Value} better. 2018-10-01 17:26:21 +01:00
Peter Powell
75e144b55e Fix the chanhistory module being inconsistent across servers.
Closes #331.
2018-10-01 12:34:47 +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
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
4567a325b8 Implement proper CTCP parsing in MessageDetails. 2018-08-26 11:33:19 +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
c5c5a867d2 Fix aliases that resolve to messages echoing with echo-message.
Fixes #1459.
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
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
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
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
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
d9a52277df 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.
2018-07-31 03:20:18 +01:00
Peter Powell
abbf70b2a3 Rename User::fullname to realname and make it private. 2018-07-30 18:50:34 +01:00
Peter Powell
7bde9de9b3 Replace most usages of "name" with "real" or "real name". 2018-07-30 18:34:57 +01:00
Peter Powell
8cb20e3545 Replace most usages of "GECOS" with "real" or "real name". 2018-07-30 18:30:11 +01:00
Peter Powell
9cf448a332 Replace irc::stringjoiner with a generic stdalgo::string::join.
This can also be used with different types of collection containing
values which are not a string.
2018-07-26 21:41:36 +01:00
Peter Powell
384ef31bc0 Use CommandBase::Params instead of std::vector<std::string>.
This is presently a typedef but will soon be replaced with a class
that encapsulates both tags and parameters.
2018-07-26 20:12:14 +01:00
Peter Powell
09c5439c02 Add a module which implements the HAProxy PROXY v2 protocol. 2018-07-26 12:35:22 +01:00
Peter Powell
ef48486b09 Rename IntModuleList to Module::List. 2018-07-24 10:02:27 +01:00
Peter Powell
2beb73aba7 Get rid of the unused string_list typedef. 2018-07-24 10:02:07 +01:00
Peter Powell
b7716ed577 Initial support for listening on UNIX socket endpoints. 2018-07-18 19:22:17 +01:00
Peter Powell
87e328a1fb Add the family() member to the sockaddrs union. 2018-07-18 19:21:45 +01:00
Peter Powell
227484c6c0 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.

Co-authored-by: Adam <Adam@anope.org>
2018-07-12 14:37:56 +01:00
Peter Powell
87361360e6 Add InspIRCd::IsHost for checking the validity of hostnames. 2018-07-10 21:14:56 +01:00
Peter Powell
e22383c6f4 Add a ConfigTag::getString overload that calls a validation method. 2018-07-10 21:14:56 +01:00
Peter Powell
2a022cb9b7 Add a silent option to <options:restrictbannedusers>.
This is useful when dealing with spambots that switch method when
they receive ERR_CANNOTSENDTOCHAN.
2018-07-10 21:01:35 +01:00
Chris Novakovic
9cd7a2e546 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.
2018-06-04 12:40:32 +01:00
Peter Powell
48a400f2e0 Move a bunch of optional module numerics to the module source file. 2018-04-22 14:35:38 +01:00
Peter Powell
ba31d8080f 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.
2018-04-22 13:31:00 +01:00
Peter Powell
35b70631f0 Merge tag 'v2.0.26' into master. 2018-04-22 13:02:19 +01:00
Peter Powell
b86d7db056 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.
2018-04-16 17:02:42 +01:00
Peter Powell
9b8dc77585 Add range checking to ConfigTag::getFloat. 2018-04-16 15:29:58 +01:00
Peter Powell
780dda83ba Add ConfigTag::getUInt for reading unsigned config values. 2018-04-16 15:29:55 +01:00
Peter Powell
2d36fcb16e Convert ConfigTag::getDuration to return an unsigned long. 2018-04-16 15:24:49 +01:00
Peter Powell
7c2adcb46a Convert ConfigTag::CheckRange to a function template. 2018-04-16 15:07:06 +01:00
Peter Powell
7ef2f87e39 Remove the default value in ConfigTag::get{Duration,Float,Int}. 2018-04-16 15:07:06 +01:00
Peter Powell
5d3b128ca2 Replace the remaining use of irc::string with irc::find. 2018-04-16 09:47:05 +01:00
genius3000
e6db1df5a6 Change ServerInfo::gecos to description 2018-04-11 18:59:17 +01:00
Peter Powell
aa19c8fc02 Remove swhois messages set in the oper block on deoper.
Closes #1240.
2018-04-09 11:59:09 +01:00