506 Commits

Author SHA1 Message Date
Peter Powell
0e6b18ff91 Fix warnings from Doxygen. 2018-10-21 19:18:08 +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
58a0a7e014 Implement IRCv3 message tag support.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 21:51: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
b7716ed577 Initial support for listening on UNIX socket endpoints. 2018-07-18 19:22:17 +01:00
Peter Powell
87361360e6 Add InspIRCd::IsHost for checking the validity of hostnames. 2018-07-10 21:14:56 +01:00
Peter Powell
9b8dc77585 Add range checking to ConfigTag::getFloat. 2018-04-16 15:29:58 +01:00
Peter Powell
c9cdf72553 Include modules/whois.h directly from files that use it. 2018-04-08 17:00:58 +01:00
Peter Powell
454c8d3749 Move OnStats from the core to a cross-module event.
Some core code still exists in the XLine system but this will be
replaced when the XLine system is replaced later.
2018-04-08 16:54:27 +01:00
Peter Powell
51206352a9 Fix some minor Doxygen errors. 2018-01-14 18:07:05 +00:00
Peter Powell
2fcb5ff438 Rework message handling.
- Move all message-related types to their own header to make moving
  them to a cross-module events easier.
- Rename OnUserMessage to OnUserPostMessage.
- Rename OnText to OnUserMessage.
- Replace the dest, target_type, and status parameters with the
  MessageTarget class.
- Replace the text, exempt_list, and msgtype parameters with the
  MessageDetails struct.
- Add echooriginal and originaltext to the MessageDetails struct
  to allow spam filtering to not be broken by cap echo-message.
2018-01-06 14:18:21 +00:00
Peter Powell
372bb6ec31 Make InspIRCd::Format return std::string instead of const char*.
Using the latter is problematic as if you don't copy the return
value before calling Format again your formatted message will be
overwritten by something else. This bug was observed in m_callerid
where InspIRCd::Format was being used for formatting two arguments
the latter of which was being overwritten with the former.

We could have preserved the return type and just copied the string
but then callers would have had to deallocate the string once they
have finished with it which is an undesirabable burden to put on
callers.
2018-01-03 12:38:40 +00:00
Peter Powell
57330e973b Get rid of InspIRCd::QuickExit.
This is just a thin wrapper around exit(). I don't think we really
need it.

While we are changing this code the setgroup/setuser code should be
using EXIT_STATUS_CONFIG too.
2017-12-23 12:13:06 +00:00
Peter Powell
fa95bb4b0d Convert the remaining things away from the caller/handler API. 2017-11-25 13:38:02 +00:00
Peter Powell
6abc789577 Convert GenRandom to std::function. 2017-11-25 13:38:02 +00:00
Peter Powell
1dca8b79ed Convert IsChannel to std::function. 2017-11-25 13:38:02 +00:00
Peter Powell
3b3cb84560 Convert IsIdent to std::function. 2017-11-25 13:38:02 +00:00
Peter Powell
7ece928bab Convert IsNick to std::function. 2017-11-25 13:38:02 +00:00
Peter Powell
91e0af0fc4 Add the override keyword in places that it is missing.
GCCs warnings for this are much better than Clangs.
2017-11-21 15:51:45 +00:00
Peter Powell
36040be295 Fix a ton of -Wsign-conversion warnings. 2017-11-17 15:33:01 +00:00
Peter Powell
ccb6c0f243 Move operquit out of the core and into core_user. 2017-09-11 16:03:06 +01:00
Peter Powell
a62ae50007 Fix a bunch of Doxygen warnings. 2017-08-26 09:58:15 +01:00
Peter Powell
81027f3a08 Move the OnCheckExemption hook out of the core. 2017-03-20 11:47:59 +00:00
Attila Molnar
b9e11915a9 Merge insp20 2016-08-17 12:49:48 +02:00
Attila Molnar
925afed1b9 Don't exit on rehash if the pid file cannot be written 2016-06-17 12:04:12 +02:00
Attila Molnar
304b6dbbf5 Introduce Stats::Context, pass it to the OnStats hook and switch all code to it 2016-02-25 17:02:03 +01:00
Attila Molnar
28dcc1f9e0 Add Numeric::Numeric 2016-02-25 15:25:02 +01:00
Attila Molnar
8f5a3bb7bc Move implementation of ConvTo*() and related functions into convto.h 2016-02-25 15:15:00 +01:00
Attila Molnar
fc8ad300cd Include stdint.h from inspircd.h 2016-02-25 15:02:01 +01:00
Attila Molnar
0854edb446 Add Numeric::Builder 2015-12-30 13:20:21 +01:00
Attila Molnar
5b5590f095 Strip all control codes except \001 in InspIRCd::StripColor()
Fixes issue #1100 reported by @uecasm
2015-12-08 16:32:50 +01:00
Attila Molnar
33137bba44 Move InspIRCd::SendError() to cmd_die
Fix multiple ERROR messages being sent to unregistered users by removing the "Exiting with status..." message
2015-05-17 18:13:45 +02:00
Attila Molnar
8f34594cb7 Move OnWhois* events to core_whois, add Whois::Context
Remove InspIRCd::SendWhoisLine()
2015-04-28 15:16:22 +02:00
Attila Molnar
3eed53a5bb Add flat_[multi]{map,set} containers 2014-12-15 17:36:20 +01:00
Attila Molnar
8baacd6ef4 Add the insp::aligned_storage template 2014-09-27 18:24:44 +02:00
Attila Molnar
984db9e301 Remove InspIRCd::BindSocket() 2014-08-04 12:12:07 +02:00
Attila Molnar
831998ff16 Move ISupportManager class declaration to isupportmanager.h from inspircd.h 2014-07-14 16:39:09 +02:00
Attila Molnar
0986021634 Add InspIRCd::TimingSafeCompare() function that compares strings in a timing-safe way 2014-06-28 18:25:05 +02:00
Peter Powell
1cf8590816 Add parameter to InspIRCd::TimeString for UTC time formats.
Missing doc added by @attilamolnar
2014-06-25 14:41:01 +02:00
Peter Powell
da9adf9e29 Add formatting to InspIRCd::TimeString; switch all code to use it.
m_httpd also now uses the correct timestamp format.

Windows-specific fixes by @attilamolnar, original PR #849
2014-06-25 14:31:25 +02:00
Attila Molnar
024906dbcd Change allocation of InspIRCd::Users to be physically part of the object containing it using fakederef 2014-06-24 12:21:31 +02:00
Attila Molnar
86092ec591 Change allocation of InspIRCd::SNO to be physically part of the object containing it using fakederef 2014-06-24 12:20:02 +02:00
Attila Molnar
a3d2b44757 Change allocation of InspIRCd::Modules to be physically part of the object containing it using fakederef 2014-06-24 12:16:57 +02:00
Attila Molnar
e66ea395e4 Change allocation of InspIRCd::Logs to be physically part of the object containing it using fakederef 2014-06-24 12:15:03 +02:00
Attila Molnar
53f7229869 Change allocation of InspIRCd::Modes to be physically part of the object containing it using fakederef 2014-06-24 12:10:59 +02:00
Attila Molnar
3a921efb0b Add the fakederef class 2014-06-24 12:08:20 +02:00
Attila Molnar
b9e323b2c3 Remove unused #define ERROR -1 2014-06-14 15:14:46 +02:00
Attila Molnar
c35089b8cf Make the default ProtocolInterface instance part of class InspIRCd
The protocol module no longer has to delete it on load and construct it on
unload, only assign a new value to ServerInstance->PI
2014-06-13 15:59:37 +02:00
Attila Molnar
5b1ee304b5 Change allocation of InspIRCd::Parser to be physically part of the object containing it 2014-06-13 15:45:55 +02:00