summaryrefslogtreecommitdiff
path: root/src/common/configuration.cpp
AgeCommit message (Collapse)AuthorFilesLines
2022-08-19Apply C++11 fixitsThorbjørn Lindeijer1-3/+3
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2013-04-27Use nullptr instead of NULL everywhereErik Schilling1-1/+1
2012-04-12Fixed Configuration::initialize() to return false when failing loadingErik Schilling1-2/+2
Reviewed-by: Bertram.
2011-11-21Allow includes in configuration file.Erik Schilling1-6/+35
You can now use <include file="myconfig.xml" /> to include a configuration file into the main configuration. Reviewed-by: Bjorn.
2011-11-01Have one place where the Configuration is initializedThorbjørn Lindeijer1-4/+11
Also, removed the fallback to the standard config file path when a config file path is specified on the command line. Surely that's not what you would want to happen. Reviewed-by: Yohann Ferreira
2011-03-24Rely more on the functionality in XML::DocumentThorbjørn Lindeijer1-10/+2
By default XML::Document will use the ResourceManager to resolve the file name you pass to it. There is no point in disabling that functionality only to resolve it manually. Reviewed-by: Jared Adams
2011-03-12Allow values to be set to empty in the configurationThorbjørn Lindeijer1-10/+10
No reason why these should be ignored and then replaced by their defaults, generally. Reviewed-by: Jared Adams
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-3/+3
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
2010-09-08Centralized stringToBool conversion.Yohann Ferreira1-2/+13
Also moved the trim() function into the utils namespace where it belongs more, and made some random code cleanups. Reviewed-by: Thorbjorn.
2010-08-22Changed the location of configuration, logs and statsThorbjørn Lindeijer1-3/+9
Instead of searching for the configuration file in ~/.manaserv.xml, the file is now expected to be in the working directory of the server. The logs and statistics will also be written there. This should make it easier to run differently configured servers on the same machine, and should also be a bit more straight-forward to setup. Reviewed-by: Yohann Ferreira
2010-05-16Don't return configuration value by referenceThorbjørn Lindeijer1-2/+2
The lifetime of the default value is often not long enough to survive to the next statement, so returning it by reference is dangereous. At the moment there may not be any place that actually tries to use the returned value as a reference, but it's better not to wait on it to happen. This was already fixed on the client after it lead to strange crashes. Reviewed-by: Jared Adams
2010-02-07Update Copyright date for Manaserv.Bertram1-1/+1
2009-12-06Fixed name of the project in copyright headersThorbjørn Lindeijer1-8/+7
Also updated the headers to refer to the GPL by URL instead of suggesting to contact the FSF by snail mail, as per the latest GPL usage instructions.
2009-05-24Stopped tmwserv from writing to its configuration fileBjørn Lindeijer1-36/+1
This was confusing, since changes made to the config file while the server is running are lost once the server exists. Also, XML comments were being stripped by the server. The command line option to set the port now only applies to a single run, and isn't saved in the configuration. There shouldn't be a need for the server to write to its configuration file, it might not even have the rights to do so.
2009-04-26Standardize on the position of the const keywordBjørn Lindeijer1-6/+6
Same as for the client.
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
2007-09-22Cleaned both configuration and resource managers.Guillaume Melquiond1-0/+122