summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
AgeCommit message (Collapse)Author
2012-12-03Properly shut down stdinattilamolnar
Replace hardcoded ints
2012-11-29Add a typedef for LocalUserListattilamolnar
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-07-21Don't hardcode conf/inspircd.conf as the config file, allow the configure ↵attilamolnar
script to override it (configure asked for the path but the ircd used the hardcoded path regardless) Fixes #264 reported by @ampt
2012-07-13Use less memory when rehashing built-in hashmapsattilamolnar
2012-06-17Fix pending invites not being removed when a channel was deleted or had its ↵attilamolnar
TS lowered
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2012-04-15Explicitly shut down stdio's stdin/stdout/stderr.William Pitcock
The previous logic here was to only do this if stdio was connected to a controlling terminal. However, we must do this always to avoid information leaks and other problems related to stdio. The only exception is if we are in debug mode.
2011-09-28Move my name from regular contributors to developersJackmcbarn
2011-04-10Fixed Windows build on VS 2010Adam
2010-09-08Add gettimeofday() fallback for systems without clock_gettimeDaniel De Graaf
2010-05-08Change -debug to force RAWIO level logging and disable all other logsDaniel De Graaf
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-18Reset the already_sent IDs during slow garbage collectiondanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12493 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-12Improve support for NetBSDdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12438 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-01-19Clean up some slow iterationsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12300 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-18Remove excessive gettimeofday system callsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12293 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-25Force heap allocation of refcountbase, create usecountbase for ↵danieldg
non-allocation reference counting git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11978 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-23Make User::uuid and User::server constdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11962 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-21Change module API to use LocalUser* where correctdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11943 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-19Fix null deref on Cleanup() called before FakeUser creationdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11926 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-19Clean up some log messagesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11917 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-19Valgrind now runs completely clean.danieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11916 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-18Add more debug logging of object lifetimesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11900 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-14Fix module unmapping with culled Module objectsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11875 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-14Move static map of extensions into ServerInstance, add const-correctnessdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11873 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-13removes unnecessary checks in modules, removes a superfluous else statement, ↵peavey
fixes some formatting. Patch by dKingston. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11867 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-13Remove needless chdir() from inspircd executabledanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11865 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-12Fix empty SID validation and generationdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11851 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-12Fix automatic SID generation when generated value is less than 100danieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11850 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-11Move 2 static extensibles from user class to inspircd class for global ↵peavey
access in an attempt to further fix windows build. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11838 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-03Get rid of a bunch of memory-wasting C-style stringsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11796 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
2009-09-30Remove include/inspircd_se_config.h and socketengine-specific headersdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11784 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Remove InspIRCd* parameters and fieldsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Clean up SocketEngine interface to allow edge-triggered I/O and sockets that ↵danieldg
do not force readability. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11760 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-24Move configuration filename specification to start script, to reduce ↵danieldg
hardcoded paths in executable git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11759 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-21Create StreamSocket for IO hooking implementationdanieldg
Fixes the SSL SendQ bug Removes duplicate code between User and BufferedSocket Simplify SSL module API Simplify EventHandler API (Readable/Writeable moved to SE) Add hook for culled objects to invoke callbacks prior to destructor Replace SocketCull with GlobalCull now that sockets can close themselves Shorten common case of user read/parse/write path: User::Write is now zero-copy up to syscall/SSL invocation User::Read has only two copy/scan passes from read() to ProcessCommand git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11752 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-16Fix iteration of ServerInstance->Users->local_users now that QuitUser can ↵danieldg
modify the vector git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11732 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13Clean up Command constructordanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11707 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13Remove redundant ServerInstance* fieldsdanieldg
It has been impossible to have more than one InspIRCd* object in the same address space for some time now, and this feature was never used. This formalizes class InspIRCd as a singleton object. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11703 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13Membership* changesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11697 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-03Change cmd_*.so to use the Module object APIdanieldg
Create Module* objects for each command, and load them like modules. This unifies the external API for modules. Library directory is now deprecated: all modules are located in a single module directory. Header files for each command are no longer needed; remove. This also fixes two potential segfaults in m_spanningtree. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11668 e03df62e-2008-0410-955e-edbf42e46eb7