Peter Powell
3faa9e3299
Move forking code into a function and remove DaemonSeed.
2019-12-08 21:19:47 +00:00
Peter Powell
d0f802e30c
Implement serialisation of users.
...
This allows for various things which will be coming in the future.
e.g. Transferring users to another server on upgrade.
2019-10-14 11:03:03 +01:00
Peter Powell
193eac6490
Fix various cases of broken indentation.
2019-07-26 10:22:42 +01:00
Peter Powell
6844ce1587
Fix building against older versions of glibc.
2019-05-06 01:57:26 +01:00
Robby
e57d1b19ff
Textual improvements and fixes such as typos, casing, etc. ( #1612 )
2019-04-28 09:14:21 +01:00
Matt Schatz
e02c22ff16
Add a function for displaying human-readable durations.
...
Add InspIRCd::DurationString() to take a time_t and return a string
with the duration in a human-readable format (ex: 1y20w2d3h5m9s).
2019-02-18 09:17:38 +00:00
Matt Schatz
f2e3fd5952
Improve X-line text consistency.
...
- Change any "-Line", ":Line", or "*line" to "-line" throughout
the X-line code, comments, and documentation.
- Add periods to the end of some notices.
- Correct a typo in the Q-line code comments.
- Update the filter module documentation (shun addition).
Co-authored-by: Robby <robby@chatbelgie.be>
2019-01-09 10:07:09 +00:00
linuxdaemon
7530285740
Only parse valid durations, don't treat invalid multipliers as seconds ( #1538 )
2018-12-21 19:37:22 +01:00
Peter Powell
cc5aff3e5a
Move IsValidDuration into the core.
2018-11-24 23:27:16 +00:00
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