summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
AgeCommit message (Collapse)Author
2014-05-26Switch to std::string::compare() from substr() in a couple of placesAttila Molnar
2014-03-15Change allocation of UserManager::clientlist to be physically part of the ↵Attila Molnar
object containing it
2014-03-14Change allocation of UserManager::uuidlist to be physically part of the ↵Attila Molnar
object containing it
2014-03-14Change allocation of InspIRCd::chanlist to be physically part of the object ↵Attila Molnar
containing it
2014-01-05Move server description field from TreeServer into Server; remove ↵Attila Molnar
OnGetServerDescription hook
2014-01-05Introduce Server classAttila Molnar
- Replaces std::string server in User - Replaces InspIRCd::ULine() and SilentULine()
2013-12-18Clean up CoreExceptionAttila Molnar
- Remove default constructor - Replace virtual functions returning C strings with functions returning const std::string refs
2013-12-18Fix issues discovered by CoverityDaniel Vassdal
- Fix resource leak in InspIRCd::Format() - Explicitly set NewServices to NULL before the object it points to goes out of scope
2013-11-12Use WriteNumeric() everywhere we send numerics and include the user's nick ↵Adam
automatically
2013-09-11Move prefix mode specific fields and getters into PrefixModeattilamolnar
Add ModeHandler::IsPrefixMode()
2013-08-30Merge insp20attilamolnar
2013-08-27Fix crash caused by passing a large integer to ctime()attilamolnar
In addition to verifying the return value of localtime(), correct tm_year if it is out of bounds Reported by @JDowny
2013-08-04Change the syntax of FOREACH macros to be less dumb.Adam
2013-07-04Remove $Core and $Mod* comments apart from $ModDep.Peter Powell
2013-06-02Move a few trivial functions into headersattilamolnar
2013-05-23Some systems with whacky va_list implementations do undefined stuff when ↵Adam
vsnprintf is called multiple times with the same list, so have InspIRCd::Format va_copy the list before each call
2013-05-21Merge pull request #545 from SaberUK/master+logging-cleanupAttila Molnar
Clean up the logging system (part 1 of 2).
2013-05-20Fixup last commitAdam
2013-05-19Fix spacing in calls to LogManager::Log.Peter Powell
2013-05-19Purge a ton of code related to non <log> related logging.Peter Powell
- InspIRCd::OpenLog - ./inspircd --logfile [file] This is no longer needed now we have (since 1.2) custom logging.
2013-05-18Replaced vsnprintf with VAFORMAT pretty much everywhere.Daniel Vassdal
2013-05-18Added macro to allow simpler logic in functions with the need to vsnprintfDaniel Vassdal
2013-05-18Remove the size argument from IsChannel and IsNick.Peter Powell
There was only one case (which was probably an error) where these methods were not set to their ServerLimits value.
2013-05-16Added a function to replace all the ugly sprintf-ing everywhereDaniel Vassdal
2013-05-14Add method for writing server notices.Peter Powell
This allows us to send a server notice to a user without worrying about whether they are registered or not. If a user receives a server notice and they are not registered then the nickname field will contain an asterisk instead of their nick name.
2013-04-13Remove const char* versions of ↵attilamolnar
InspIRCd::FindNick()/FindNickOnly()/FindUUID()/FindChan()
2013-04-12Add LOG_ prefix to the log level enum values.Peter Powell
2013-04-11Convert ISUPPORT to use a map instead of a string.Peter Powell
2013-04-03Convert InspIRCd::Duration() to be staticattilamolnar
2013-04-01Change IsNickHandler()/IsIdentHandler()/IsChannelHandler() to use C++ ↵attilamolnar
strings as arguments instead of C strings
2013-04-01Convert IsSID() to a static member function, modules shouldn't override itattilamolnar
2012-12-09Remove ServerLimits::Finalise(), it's completely wrongattilamolnar
Truncate <limits:identmax>+1 long idents in User::ChangeIdent()
2012-11-29Add a typedef for LocalUserListattilamolnar
2012-11-28Have FindUUID(const char*) call FindUUID(const std::string&), not the other ↵attilamolnar
way around
2012-10-29Move ServerConfig::ProcessColors() into class InspIRCd, as a helper functionattilamolnar
Change signature to accept a file_cache reference so modules can use it easily
2012-10-19Fix for #268.Peter Powell
- Move color stripping code to helperfuncs. - Strip color codes before matching filters.
2012-10-14Replace printf(_c) with iostreamChrisTX
2012-10-12Windows: In-depth cleanup (see details)ChrisTX
-Fix x64 builds for Windows. Now all configurations compile. -Remove the non-working rebase stuff. -Remove the Windows fork hack and instead use FreeConsole() to emulate the behavior. This directly allows us to compile with ASLR, which is turned on now. -Remove the old IPC mechanism for the removed GUI. This is not needed anymore as the GUI wasn't ever supported on anything newer than 1.2 -Remove the WIN32/WINDOWS macros. _WIN32 is supported on all x86-based VC++ targets, so that's what we need. -Enable optimizations for release builds. -De-duplicate printf_c(), it was previously copy-pasted into colors.h for configure -Add the VC++ specific bad files in .gitignore -Disable PID writing on Windows. This is only making sense for *nix builds. -Replace the CPU usage retrieval with an algorithm analogous to the *nix behavior. Also supports separated now/total values. (Tested with a dummy busy loop - seems working) -Removed certain unused functions and variables -Remove stdint defines from the windows wrapper -Remove CRT debug alloc. This is a bad idea as it would define a macro to replace free which breaks builds. -Re-evaluated the warnings list, commented it. -Moved inspircd_config/_version to include/ to match *nix -Removed the creation of inspircd_se_config, as it isn't used at all. -Made non-git builds show as "r0" instead of "r" (thanks to @SaberUK for pointing this out) -Fixed up m_spanningtree's project paths. Now all configurations (debug/release x86/x64) have been tested and build properly. -Moved FindDNS out of the wrapper and matched its log behavior with *nix. (It's pointless having it in the wrapper after the recent slimming down) -Replaced random/srandom wrappers with a mechanism that tries to use Windows' Random API first is no SSL module is loaded. -Removed more old junk from support for compilers older than VC++ 2010 (we don't have project files for these, so compiling them would be hard anyways) -Removed the unused ClearConsole() -Removed unused includes from the wrapper. Also, do not include psapi.h here if we don't link psapi.lib. This should be done where appropriate. -Made inet_aton an inline function for increased performance -C4800, performance warning about bool forcing, resolved at all occurrences. -C4701, uninitialized variable 'cached', resolved at all occurrences. -dlerror() was migrated out of the wrapper for more thread safety (no global buffer being shared) and increased performance. -Removed the wrong CRT debug flags. This drains a lot of performance. -Removed the clock_gettime/gettimeofday wrappers -Replaced all TCHAR/ANSI mix-ups of functions with the correct respective function. -Added a block of C4355 for < VS2012 -Update project files for c870714
2012-10-04Replace hardcoded paths with configurable onesChrisTX
This patchset aims to ease the packaging of InspIRCd for a system-wide installation scenario. Changes in detail: configure: Add the options --log-path and --data-path m_ssl_gnutls, openssl: Change the hardcoded "conf/" to the existent CONFIG_PATH macro m_xline_db: Make the location of xline.db configurable. It will use --data-path as default value, but this can be changed using the configuration files.
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2010-03-01Cap masks and bans at 250 charactersdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12575 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-20Fix compilation warningdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12504 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-20Restore <options:exemptchanops> with long namesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12502 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-09Add random number generation functions to InspIRCd class.danieldg
Default implementation uses libc random(), which can be better than rand(). If gnutls is loaded, gcrypt will be used to provide random numbers. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12404 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-02Sort items in the 005 linedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12351 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-11...because every now and again, i have to do a massive commit.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-21Move command-line items to CommandLineConfdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11949 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-21Split LocalUser and RemoteUserdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11940 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-13Change to new execution directory structuredanieldg
Don't change CWD into bin/ Remove path-resolution hacks from configuration Store pidfile and xline DBs in data, logs in logs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11866 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-02Fix valgrind issues and crashes on exitdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11794 e03df62e-2008-0410-955e-edbf42e46eb7