summaryrefslogtreecommitdiffstats
path: root/src/main.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-04-06Fixed MSVC warnings, improved comments.Mattes D1-5/+5
2015-04-05Fixed crash on exit introduced with Windows Service capability.Mattes D1-7/+14
Ref.: #1845
2015-04-01Working as a Windows service. Starts and stops correctly.Anthony Birkett1-33/+191
Added "/service" switch, to prompt the binary to attempt starting as a service. Added service* methods, to control service startup. Split up main() into universalMain(), which contains the startup code for both service and normal start. Added cRoot::m_RunningAsService bool, Added cRoot::SetStopping(bool) to allow a stop request to be sent by the service controller. Added cBlockIDMap::init() to avoid loading items.ini before the working directory has been set.
2015-03-18Added cNetwork initialization to program start.Mattes D1-0/+4
Otherwise the server could crash because MSVC doesn't implement magic statics yet.
2015-01-27Added network termination called at app exit.Mattes D1-2/+9
This fixes a crash in MSVC runtime caused by joining a thread in a global var's destructor.
2014-11-29Removed unneeded include.Mattes D1-1/+0
2014-11-29Added a basic stacktracing for assert and signal failures.Mattes D1-0/+6
2014-11-26Windows: Fixed builds with LeakFinder enabled.Mattes D1-1/+1
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-4/+4
2014-10-21Windows close handlers handles more closesTiger Wang1-5/+2
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-4/+4
2014-10-20Migrated cSleep and cTimer to std::chronoTiger Wang1-1/+4
2014-08-12Renamed LoggersTycho1-1/+1
2014-08-10First Implementatation of new Loggin frameworkTycho1-0/+2
2014-07-21Normalized spaces after "catch".madmaxoft1-2/+2
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-5/+5
2014-07-20main.cpp: field style fixesarchshift1-7/+7
2014-07-19main.cpp: Fixed warnings with g_TERMINATE_EVENT_RAISED and g_SERVER_TERMINATEDarchshift1-4/+4
2014-07-17Normalized comments.madmaxoft1-2/+2
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17Fixed spaces around single-line comments.madmaxoft1-9/+9
There should be at least two spaces in front and one space after //-style comments.
2014-07-17Fixed basic whitespace problems.madmaxoft1-2/+2
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-06-01abort does not take a parameter.worktycho1-2/+2
2014-06-01Use abort in SIGSEGV and SIGABRT handlersworktycho1-2/+2
This should cause Mcserver to generate core dumps when it crashes.
2014-03-14Fixed a few unneeded breaksTycho1-1/+0
2014-02-27Added a "nooutbuf" cmdline param.madmaxoft1-11/+16
This forces that the stdout stream uses no buffer, even when not a TTY. Used for running MCServer under ZeroBraneStudio.
2014-02-20Disabled the leak finder.madmaxoft1-1/+3
2014-01-27SIGABRT exits with failure.Tiger Wang1-0/+1
2014-01-26Fixed client packet parsing.madmaxoft1-3/+23
When the packet wouldn't fit the current buffer, the server would mis-parse the next packet. This was the cause for #541. Also modified comm logging, now each direction can be turned on separately.
2014-01-26Added SIGABRT to catchers listTiger Wang1-1/+6
2014-01-25Comm logging is available in both Debug and Release modes.madmaxoft1-4/+0
2014-01-24Fixed *nix compilation for previous commit.madmaxoft1-2/+2
2014-01-24Added per-connection comm logging in debug mode.madmaxoft1-1/+24
It is meant for debugging only, so it is compiled only into debug mode. It is activated by starting the server with "/logcomm" parameter.
2014-01-17Fixed SIGABRT_COMPAT on other architectures.madmaxoft1-0/+2
2014-01-16Changed newline character because of issuesTiger Wang1-1/+10
2014-01-07Graceful shutdown on SIGTERMTiger Wang1-0/+5
2013-12-24Fixed comments in main.cpp and Player.cppTiger Wang1-1/+1
2013-12-23Added some comments in main.cppTiger Wang1-1/+1
2013-12-22Added many event catchersTiger Wang1-11/+53
* Window close * CTRL-C * etc.
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-08-07Removed Squirrel.madmaxoft1-4/+0
This compiles under Windows, but is untested in Linux.
2013-05-25Added base Code::Blocks project (WIP, still doesn't compile) and fixed some source errors with MinGW.madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1510 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-20Use leakfinder in debug builds to dump all currently used memory via the "dumpmem" console command.madmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@984 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-15Compiles on Android! Added Eclipse project, import it into your workspace and it should be runnable on Android!faketruth1-1/+8
Disabled Squirrel for Android cLog now logs to Android LogCat as well Fixed Lua so it compiles on Android Removed/commented out exceptions in JsonCpp so it compiles on Android git-svn-id: http://mc-server.googlecode.com/svn/trunk@741 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-16Some code improvementslapayo94@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@677 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15A new Block handling system :olapayo94@gmail.com1-10/+0
It was really a lot of work :D Took me the complete weekend :D Would really like to here your opinion on this =) The aim of this is to put all the actions for one block in one place so it is not spread around the source. (ToPickup, Action in cWorld, Action in cChunk, Action here, action there :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@671 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-08Squirrel Pluginslapayo94@gmail.com1-3/+4
I worked a little bit on the squirrel Bindings They work now on linux and windows :) (OSX is untested, but should work also) but they are very limited at the moment. (Only made OnChat working) I also fixed some small bugs. git-svn-id: http://mc-server.googlecode.com/svn/trunk@648 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-204/+204
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-09Using the _DEBUG macro for *nix debug builds as well; trying to force 8-byte alignment on critical sections ( http://forum.mc-server.org/showthread.php?tid=384 )madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@387 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-23Added cmdline parameters "/cdg" and "/cdf" for crashdump flags "globals" and "full memory"madmaxoft@gmail.com1-2/+17
git-svn-id: http://mc-server.googlecode.com/svn/trunk@322 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-22Restricted windows crash dump generating code to 32-bit platforms only due to inline assemblymadmaxoft@gmail.com1-5/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@307 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21Added code to produce dump files on Windows builds to aid with debugging server crashesmadmaxoft@gmail.com1-0/+85
git-svn-id: http://mc-server.googlecode.com/svn/trunk@306 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16Chunk is now marked as dirty; saving only dirty chunks; rewritten load / save not to use cChunkPtr; set VC2008 project to level4 warnings; block entities are now loaded and saved properlymadmaxoft@gmail.com1-1/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@273 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-13Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.madmaxoft@gmail.com1-10/+45
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-7/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-08It's a Squirrel!!faketruth1-0/+12
In SquirrelBindings.h use #define USE_SQUIRREL 1 to enable squirrel git-svn-id: http://mc-server.googlecode.com/svn/trunk@76 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-01You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yetfaketruth1-0/+2
Players are now stored in separate folder /players instead of in the world folder (!so move the folder!) Fixed a memory leak/error in cPickup.cpp Multiple worlds are stored in cRoot cClientHandle lists are taken out of cWorld and now stored in cServer Worlds now have names to distinguish them by Some functions in the Core plugin now distinguish between worlds git-svn-id: http://mc-server.googlecode.com/svn/trunk@40 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-22Found something that calls a function when a segfault happens, might be useful.faketruth1-4/+16
git-svn-id: http://mc-server.googlecode.com/svn/trunk@7 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-21Compiles for linuxfaketruth1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@6 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+36
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6