aboutsummaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
Commit message (Expand)AuthorAgeFilesLines
* Fix a bunch of weird indentation and spacing issues.Gravatar Sadie Powell2021-04-271-1/+1
* Fix a bunch of really obvious unnecessary includes.Gravatar Sadie Powell2021-03-051-2/+0
* Update copyright headers.Gravatar InspIRCd Robot2021-03-051-1/+1
* Update copyright headers.Gravatar InspIRCd Robot2020-10-301-1/+1
* Refactor GenRandomStr for performance and readability.Gravatar Sadie Powell2020-09-231-8/+6
* Update copyright headers.Gravatar InspIRCd Robot2020-04-241-1/+1
* Fixes by misspell-fixerGravatar InspIRCd Robot2020-04-211-1/+1
* Update user-facing text and comments of SSL to TLS.Gravatar Matt Schatz2020-04-141-1/+1
* Update copyright headers.Gravatar InspIRCd Robot2020-01-111-5/+10
* Improve behaviour when running as root.•••- Only give the annoying message about root if --runasroot is not specified. - If --runasroot is specified then assume the user knows what they are doing. - Move CheckRoot to a static function in inspircd.cpp. Gravatar Peter Powell2019-12-081-12/+0
* DurationString(): Return "0s" for a duration of 0 (#1677).•••Usually a duration of 0 is not allowed or handled separately, but it can also be used as a 'no set time' without separation. Case in point: m_chanhistory calls DurationString() to convert the max time seconds back to a human readable string for the mode serializer. Returning a blank string is bad here. Gravatar Matt Schatz2019-07-041-0/+3
* Fix years being offset from weeks (#1678).•••Currently a duration of 52w will return a blank string. When I added weeks to the calculations, I failed to update the number of seconds to a year. As 365 days and 52 weeks aren't the same, but the calculation needs to be consistent.Gravatar Matt Schatz2019-07-041-1/+1
* 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). Gravatar Matt Schatz2019-02-181-0/+28
* Only parse valid durations, don't treat invalid multipliers as seconds (#1538)Gravatar linuxdaemon2018-12-211-39/+38
* Move IsValidDuration into the core.Gravatar Peter Powell2018-11-241-2/+40
* Add missing special character for reversing color.Gravatar Robby2018-11-201-0/+1
* Fix single backslashes in the MOTD erroneously being removed.Gravatar Peter Powell2018-11-181-1/+1
* Use arc4random_buf() instead of random() when available.Gravatar Peter Powell2018-07-201-3/+7
* Add InspIRCd::IsHost for checking the validity of hostnames.Gravatar Peter Powell2018-07-101-0/+59
* 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. Gravatar Peter Powell2018-04-221-13/+14
* 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. Gravatar Peter Powell2018-01-031-4/+4
* Use GetMaxMask in InspIRCd::IsValidMask instead of hardcoding 250.Gravatar Peter Powell2017-12-191-1/+1
* Convert GenRandom to std::function.Gravatar Peter Powell2017-11-251-1/+1
* Convert IsChannel to std::function.Gravatar Peter Powell2017-11-251-1/+1
* Convert IsIdent to std::function.Gravatar Peter Powell2017-11-251-1/+1
* Convert IsNick to std::function.Gravatar Peter Powell2017-11-251-1/+1
* Fix a ton of -Wsign-conversion warnings.Gravatar Peter Powell2017-11-171-2/+2
* Switch the default datetime format to something easier to read.Gravatar Peter Powell2017-10-201-1/+1
* Move the OnCheckExemption hook out of the core.Gravatar Peter Powell2017-03-201-25/+0
* Fix InspIRCd::StripColor() stripping characters that shouldn't be strippedGravatar Attila Molnar2015-12-291-1/+1
* Strip all control codes except \001 in InspIRCd::StripColor()•••Fixes issue #1100 reported by @uecasm Gravatar Attila Molnar2015-12-081-1/+2
* Deduplicate code in InspIRCd::FindNick()Gravatar Attila Molnar2015-12-071-8/+1
* Move InspIRCd::SendError() to cmd_die•••Fix multiple ERROR messages being sent to unregistered users by removing the "Exiting with status..." message Gravatar Attila Molnar2015-05-171-19/+0
* Move OnWhois* events to core_whois, add Whois::Context•••Remove InspIRCd::SendWhoisLine() Gravatar Attila Molnar2015-04-281-20/+0
* Prepend target user nick to whois numerics in InspIRCd::SendWhoisLine()Gravatar Attila Molnar2015-04-281-1/+3
* Access local user list via new UserManager::GetLocalUsers() and make local_us...Gravatar Attila Molnar2014-07-191-1/+2
* Move and rename typedef LocalUserList to UserManager::LocalListGravatar Attila Molnar2014-07-191-1/+1
* Add parameter to InspIRCd::TimeString for UTC time formats.•••Missing doc added by @attilamolnar Gravatar Peter Powell2014-06-251-2/+2
* 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 Gravatar Peter Powell2014-06-251-2/+10
* Switch to std::string::compare() from substr() in a couple of placesGravatar Attila Molnar2014-05-261-1/+1
* Change allocation of UserManager::clientlist to be physically part of the obj...Gravatar Attila Molnar2014-03-151-4/+4
* Change allocation of UserManager::uuidlist to be physically part of the objec...Gravatar Attila Molnar2014-03-141-2/+2
* Change allocation of InspIRCd::chanlist to be physically part of the object c...Gravatar Attila Molnar2014-03-141-2/+2
* Move server description field from TreeServer into Server; remove OnGetServer...Gravatar Attila Molnar2014-01-051-17/+0
* Introduce Server class•••- Replaces std::string server in User - Replaces InspIRCd::ULine() and SilentULine() Gravatar Attila Molnar2014-01-051-17/+0
* Clean up CoreException•••- Remove default constructor - Replace virtual functions returning C strings with functions returning const std::string refs Gravatar Attila Molnar2013-12-181-2/+2
* Fix issues discovered by Coverity•••- Fix resource leak in InspIRCd::Format() - Explicitly set NewServices to NULL before the object it points to goes out of scope Gravatar Daniel Vassdal2013-12-181-0/+2
* Use WriteNumeric() everywhere we send numerics and include the user's nick au...Gravatar Adam2013-11-121-1/+1
* Move prefix mode specific fields and getters into PrefixMode•••Add ModeHandler::IsPrefixMode() Gravatar attilamolnar2013-09-111-1/+1
* Merge insp20Gravatar attilamolnar2013-08-301-1/+20
|\