summaryrefslogtreecommitdiff
path: root/src/server.cpp
AgeCommit message (Collapse)Author
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-09-30Fix more undefined behavior caused by referencing the returned buffer by ↵attilamolnar
std::string::c_str() when the object is temporary See 83c7cc45daf6fb1f8c36f15297a4657e45a34e88
2012-07-27Don't hard code the branch version.Peter Powell
2012-07-02Add CHANNELLEN to isupportAlyx
2012-05-27While at it, use a constant parameter for calling IncrementUID in GetUIDattilamolnar
Get rid of curindex, use a bool to determine if we need to initialize
2012-05-27Fix generating invalid UIDs after current_uid is 000Z99999 (next UID became ↵attilamolnar
000[AAAAA)
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2012-04-14Fix unused variables reported by the clang static analyzer.Peter Powell
2011-03-18Values were -1, couldnt find an explanation for that. So appliedDjSlash
submitted patch from bug 114 (thanks to DarkStorm) and removed additional -1's.
2010-04-28Add log header including ircd versionDaniel De Graaf
2010-02-16Remove SYSTEM and related sensitive information from the non-oper VERSION linedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12471 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-15Show opers the raw VERSION string, not the custom onedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12470 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-11-03Remove AllowHalfop item from server configdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11996 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-22Clean up unused functions, add nonicks operoverride [dKingston]danieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11951 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-20Fix GetUID generating 10-character UUIDsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11932 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-16Clean up crash on destruction of statics at exitdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11877 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-09-26Remove InspIRCd* parameters and fieldsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 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-05Bump a number of version numbers.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11676 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02More deallocation-at-exit cleanupdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11621 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-01Move VERSION/REVISION to their own header to avoid needless rebuilds on updatedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11561 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-28Don't subtract one from MAXCHANNELS, it's a number, not a string length.w00t
Reported by Sm0ke0ut. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11541 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-06Report the correct sizes as set in the configbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11499 e03df62e-2008-0410-955e-edbf42e46eb7
2009-07-01Make rehash generate a new ServerInstance->Config objectdanieldg
This makes it possible to cancel a pending rehash, and fixes possible threading issues with rehash and other events. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11424 e03df62e-2008-0410-955e-edbf42e46eb7
2009-05-24OnRehash changes: split to multiple hooks to clarify use and prevent ↵danieldg
explosion of rehashes on a /REHASH * git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11388 e03df62e-2008-0410-955e-edbf42e46eb7
2009-04-16Convert snomask 'A' into snomask 'a' for local announcements, add snomask ↵w00t
'A' for remote announcements. Make SAMODE send a snotice to 'a' and remote to 'A' - fixes bug #822, reported by Taros We really need a wrapper to use these, but, for now it's usable. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11304 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-23ConfigReaderThread updates: add done flag, remove main-thread-only mutexdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11256 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-23ThreadEngine: remove MutexFactory, mutexes should be constructed using their ↵danieldg
constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11250 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-23ThreadEngine: remove excessive mutex use on thread creationdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11249 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-15Update all wiki links to point to the new wiki. This was done automatically ↵psychon
with the following command, only .Makefile.inc got some indent fixups by hand. for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-14Nuke trailing spacespeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02Update copyrights for 2009.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-22Thread safety fixes to avoid crashes on rehash, dont reopen logs within the ↵brain
rehash thread. Put this in the safe part of the rehash operation, after the thread exits. Put a mutex around the part where the thread exits, just in case somehow there are two rehash threads exiting at the same time due to user muppetry. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10811 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-27Add user/channel mode synchronisation detection to CAPAB - link will now ↵w00t
drop if modes differ in some way (one side requires param, other doesn't, etc). Same for user modes. This will not affect services. Side effect: Modes::ChanModes() -> Modes::GiveModeList(ModeMasks), mode list is formatted identically for both MASK_CHANNEL and MASK_USER. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10733 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-20Fix a rather nasty race condition revealed by my reading through the ↵brain
comments and enhancing them. Back when i did executeable includes, i placed a 'todo' in the code which said something along the lines of: 'we cant pass a User* into the config reader any more, because when the config reader thread finishes, that user may be gone and this will crash. Consider using an UID instead so that if the user vanishes, we can detect this situation.' Of course, nobody ever did this, so i'm doing it now to ensure we dont come up against some particularly ugly race condition crashes! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10569 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24Properly give the service specific exit code on failure to start. Now we ↵brain
just need to find out how to retrieve this git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10240 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-29Remove last vestige of libircdfoo, by changing tag into a single ↵w00t
identifier marking object as requiring compilation into a .o (minor commit) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10076 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-25First phase of conversion to dynamic limits on all the lengths, configured ↵brain
via the <limits> tag (the tag isnt there yet, these all just run on defaults in the class constructor) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9802 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-21Merge in large patchset from GreenReaper, useful fixes for freeing a ton of ↵brain
different things on shutdown for tidyness, and a few stack corruption fixes in the mode handler git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9565 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-13Port a bunch of methods of InspIRCd to functors. IsChannel, IsSID, Rehash.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9474 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-05More standardized version output in 002 and 004 to make indexing for version ↵brain
numbers better git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9351 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02Fix all this crap - it actually works now (we pray..)w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9261 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02Better generation. This is still fucked up, but less spectacularly and in a ↵w00t
much less obvious way. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9260 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02Unneededw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9255 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-24This should fix remote rehashbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9030 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-15Make -nofork work properly with logging now.aquanight
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8944 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-09Implement LogManager::CloseLogs() to give logstreams a chance to clean up on ↵w00t
rehash or exit. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8863 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-03Clear up header insanityw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8808 e03df62e-2008-0410-955e-edbf42e46eb7