1252 Commits

Author SHA1 Message Date
loonycyborg
16e5496f7e Re-enabled functionality to read bans from file 2016-04-10 19:11:32 +03:00
Celtic Minstrel
e7d254bce7 Update XCode project 2016-04-07 12:18:03 -04:00
loonycyborg
94c8533e1f Merge branch 'master' into asio_wesnothd 2016-04-07 17:17:21 +03:00
Charles Dang
0ca4e6c943 Convert uses of boost functional to standard library variants
This commit converts the following function calls:

* boost::bind                          -> std::bind
* boost::function and boost::functionN -> std::function
* boost::ref and boost::cref           -> std::ref and std::cref
* boost::bad_function_call             -> std::bad_function_call

In the process, it was discovered that std::bind has trouble with overloaded
functions. There were two such cases in the code:

* gui2::twindow had an ancient unused overload to draw(). The overload was removed.
* gui2::trepeating_button was binding tdispatcher::fire. This case was converted
  to a lambda.
2016-04-04 02:20:52 +11:00
Celtic Minstrel
ca382018b7 BOOST_FOREACH -> range for 2016-04-02 09:38:29 -04:00
Celtic Minstrel
982394fe3a Remove custom FOREACH macro in favour of range-for 2016-04-01 12:08:05 -04:00
Celtic Minstrel
3ac7f8d970 NULL -> nullptr
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04:00
Charles Dang
f849048a42 Use unique_ptr instead of auto_ptr (deprecated in c++11) 2016-03-31 09:43:13 +11:00
Celtic Minstrel
bc711f5f43 Consolidate related files into subdirectories 2016-03-20 16:20:09 -04:00
Celtic Minstrel
fe0df45947 Consolidate formula and hotkey files in corresponding dirs 2016-03-20 16:15:50 -04:00
Celtic Minstrel
8122039707 Rename .tpp -> .hpp
Several header files used the .tpp extension, which means that they are not correctly detected as C++ (though this can be overridden and has been for one case in the XCode project). The .tpp extension is one of several intended for private template instantiations, but these headers were topleve headers included in many places.
2016-03-19 21:57:03 -04:00
Celtic Minstrel
8e588972f4 Ensure logging objects are constructed on first used
This makes it safe to log messages during static initialization.
2016-03-19 21:12:11 -04:00
Charles Dang
83ee4f6087 Convert most includes to src/-relative
This excludes includes that need backtrack path specifiers in order to resolve
name clashes.
2016-03-19 19:35:17 +11:00
gfgtdf
215b7b3b7f Add some log to wesnothd
mainly for the travis mp tests.
2016-03-03 21:58:20 +01:00
loonycyborg
cea8fb1dc9 Clean up some commented out code and dead code 2016-02-13 17:12:33 +03:00
loonycyborg
171d6a4e0a Implemented shutdown and restart admin commands 2016-02-02 18:31:30 +03:00
loonycyborg
3640fc33fd Implemented client redirection to other servers based on version 2016-02-02 15:14:26 +03:00
loonycyborg
ae2ae3b487 Moved SIGINT and SIGTERM handling into asio event loop 2016-02-01 17:30:44 +03:00
loonycyborg
610c844a7c Ensure that games are always deleted when all players log off 2016-01-26 02:13:12 +03:00
loonycyborg
dcf4355e76 Autoremove disconnected players from games 2016-01-26 01:36:36 +03:00
loonycyborg
d0f206d185 Improved log message for incorrect wml received 2016-01-25 19:22:58 +03:00
loonycyborg
00819df166 Properly call error handler in case of wml exception 2016-01-25 17:29:02 +03:00
loonycyborg
93cf0f2975 Moved game and user lists into one multi_index_container
This also removes support for multiple rooms in lobby
2016-01-23 20:52:09 +03:00
loonycyborg
7666030367 Merge branch 'master' into asio_wesnothd 2016-01-19 15:21:06 +03:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
gfgtdf
d20cd899db fix unused variable 2015-12-30 01:19:01 +01:00
gfgtdf
5813f93399 fix spelling 2015-12-30 00:32:54 +01:00
gfgtdf
213353ad5c removed unused attributes from [host_transfer] 2015-12-30 00:25:20 +01:00
gfgtdf
b9e13d2499 fix wesnothd build 2015-12-29 23:43:54 +01:00
gfgtdf
99416763f8 Don't modify game::level_ in load_next_scenario()
level_ should be the initial gamestate from an observer point of view,
so this shouldn't be edited when a player advances to the next
scenario.
2015-12-29 23:30:35 +01:00
gfgtdf
1b9c72d319 use enums instead of strings for controllers in wesnothd::game
This is not only faster, it is also easier to understand, becasue it is
now obvious that every enement of side_controllers_ can only be 'human',
'ai' or 'null'.

This also makes enum::parse() in MAKE_ENUM a template. This way it also works
with other string classes, specially string_span from simple_wml.
2015-12-29 23:30:34 +01:00
gfgtdf
4d14482159 replace controller=network,network_ai with is_local=no in [side]
This has 3 advantages:
1) It makes the serversided handling of controller= attribute easier.
2) It prevents OOS causes by wrong use of the [side] controller=
attribute
3) It gived us a field to store the local/remote data for
null-controlled sides, this could be useful in cases where the
controller changes from null no non-null, Currently is_local is ignored
for null-controlled sides.
2015-12-29 23:30:33 +01:00
gfgtdf
12b72bfa90 don't read [side]side= on serverside
This is more robust becasue we don't even have to think about possible
wrong side= attributes.
2015-12-29 23:30:31 +01:00
gfgtdf
26bdf7494d don't change side controllers when reassigning sides.
the bug which was fixed by this code (https://gna.org/bugs/?13038)
shouldn't happen anymore becasue droiding sides now only changes the
proxy controller.
2015-12-29 23:30:30 +01:00
gfgtdf
03676625e9 remove some backwards compability code from wesnothd. 2015-12-29 23:30:28 +01:00
gfgtdf
0aff1806bb removed unneeded change_controller calls.
these change_controller calls didnt change the controller (the
controller is always human before and after). I also removed the
serversided code which handles these [change_controller] packages.
2015-12-29 23:30:27 +01:00
gfgtdf
5908d972c5 format fixes 2015-12-29 23:30:24 +01:00
gfgtdf
199d8416df dont treat controller=reserved specially in game::update_side_data()
controller=reserved should tread reserved like other not-assigned-yet
sides and not like null controlled sides.
2015-12-29 23:30:22 +01:00
loonycyborg
5f34b95b33 Reactivate kick functionality 2015-12-25 21:54:12 +03:00
Elvish_Hunter
9b7b1751fd Removed trailing tabs and whitespaces from C++ source
I used this command line: find <source directory> -name \*.\[ch\]pp -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
2015-12-21 20:39:46 +01:00
Charles Dang
0e87847669 Added some includes I needed to build with SDL2
If these cause problems for other people, feel free to revert.
2015-12-20 05:44:51 +11:00
Andreas Löf
2c1f3ef540 Merge branch 'master' into sdl2 2015-12-19 12:03:12 +13:00
gfgtdf
7f13156c28 Revert "Rename team_name/user_team_name to team_id/team_name (old syntax still valid)"
And related commits.

This reverts commit 545253ec2b117b413e7ef40e06e65d358ce20f77.
This reverts commit 1215f65eb875cc3070e8d087ce699c0a2ff8d8b0.
This reverts commit 11664f4024cb760de7db5fec54661cd14fc05ac8.
This reverts commit e948df3424657c5843b1fb65a1319449bb6311bc.
This reverts commit 3781e7839f29915292a2452c37b08a1e1fce9841.

This commits were reverted to exclude them from wesnoth 1.13.2 release because:
1) We are still unsure about the best name oftthese attributes
2) This breaks multiple campaigns, including LoW and the tutorial.
Feel free to revert this revert after 1.13.2 when thse issues can be solved..
2015-12-10 21:29:52 +01:00
Andreas Löf
81480d1d77 Merge branch 'master' into sdl2 2015-12-01 22:33:24 +13:00
loonycyborg
de8f839da2 Reenabled handling of SIGHUP 2015-11-29 20:19:44 +03:00
loonycyborg
084a7c279e Reenabled the capability to read admin commands from named pipe 2015-11-29 18:51:09 +03:00
loonycyborg
83fdb92197 Reenable filesystem calls in server.cpp 2015-11-23 00:23:14 +03:00
gfgtdf
9ce59881d2 fix wesnothd::game::send_data_sides 2015-11-17 20:59:36 +01:00
Andreas Löf
3036b4ee49 Merge branch 'master' into sdl2 2015-11-17 17:44:09 +13:00
loonycyborg
879ab58e39 Remove dependency on SDL from wesnothd 2015-11-15 17:14:11 +03:00