summaryrefslogtreecommitdiffstats
path: root/src/main.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-01-03Add the fmt library (#4065)peterbell101-1/+5
* Replaces AppendVPrintf with fmt::sprintf * fmt::ArgList now used as a type safe alternative to varargs. * Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu. * Adds FLOG functions to log with fmt's native formatting style.
2017-12-22Fix Travis build (#4101)peterbell101-4/+6
Stop using gdb on osx - was breaking the build Add clang 3.5 build as travis now defaults to 5.0 Fix unknown-warning-option errors on AppleClang ProtoProxy: Use nullptr UrlClientTest: add override to callback destructor Update jsoncpp to use nullptr
2017-12-21Fixed Clang 5.0 compile errors (#4085)bibo381-0/+10
* Fixed Clang 5.0 compile errors * Fixed wrong comment * Only disable warnings in Clang 5 or higher * Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning * Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-06-19Removed the LeakFinder for Windows. (#3777)Mattes D1-30/+0
2017-06-03Add command line argument for disabling the logfileworktycho1-0/+5
2017-02-22Add support for alternate config file locations (#3578)Gareth Nelson1-0/+8
2016-12-12Use CMake's Android generators to crosscompileTiger Wang1-4/+14
2016-07-30Fixed port command line argument. (#3287)Alexander Harkness1-5/+1
2016-04-14Revert "Issue3136"LogicParrot1-2/+6
2016-04-12Fixed port override code.Alexander Harkness1-6/+2
2016-02-05Bulk clearing of whitespaceLogicParrot1-7/+7
2016-01-21Fix running as a service.Anthony Birkett1-0/+3
Two problems identified, both traced to commit 4315a11 (main.cpp) ParseArguments() was no longer being called before checking cRoot::m_RunAsService. This led to m_RunAsService never being set (we use -d on the command line to instigate a service start). (Root.cpp) Terminate events were being ignored when running as a service. We only need to ignore the cin.good() call, not terminate events as a whole.
2016-01-06Fixed Clang warnings.Mattes D1-14/+25
2015-09-26Added the _UNICODE flag on WindowsTiger Wang1-8/+8
2015-09-25Maked it compileable for clang-3.7Lukas Pioch1-2/+2
2015-09-25Compile.sh namechange to cuberiteSafwat Halaby1-6/+6
2015-09-25Namechange to CuberiteMattes D1-6/+6
2015-09-19Ignore Sigpipetycho1-0/+4
2015-09-15Increase robustness of the logging subsystemtycho1-0/+1
2015-08-20Fixed and improved restartingTiger Wang1-33/+32
Restarts are now an actual, close-as-possible to application exit+reopen.
2015-08-10Checked LeakFinder in MSVC2015, enabled support for it.Mattes D1-3/+4
2015-06-05Daemon support on Linux.Anthony Birkett1-12/+34
Added null console log listener, avoid printf() when stdout is closed.
2015-06-02Added cmdline params for crashdump detailness.Mattes D1-94/+77
Win32-only, also fixed the call scripts. Fixes #2184.
2015-06-01Use the new style command line parameters for Windows Service support.Anthony Birkett1-10/+9
Ignore invalid or malformed command line parameters, prevent unhandled exceptions. NOTE: Users will need to reinstall the service, now uses "-d" instead of "/service" in the start parameters.
2015-05-20Moved no buffering command line argument to tclaptycho1-5/+8
2015-05-20Move commlog arguments over to TCLAPtycho1-25/+18
2015-05-18Add support for setting ports through command linetycho1-1/+12
2015-05-18Fix max slots logic to only override if acctually present.tycho1-4/+9
2015-05-16Fix service Mainworktycho1-1/+1
2015-05-16Move make_unique into a namespace to avoid ADL issuestycho1-1/+1
this prevents VS finding std::make_unique for constructors that take types from std
2015-05-16Initial implementation of IniFile overloadingtycho1-7/+35
2015-05-04Print Build info as part of the crash informationworktycho1-0/+9
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