aboutsummaryrefslogtreecommitdiff
path: root/src/terminal_chat_console.cpp
Commit message (Collapse)AuthorAge
* Add server side ncurses terminalest312015-11-06
This adds a chat console the server owner can use for administration or to talk with players. It runs in its own thread, which makes the user interface immune to the server's lag, behaving just like a client, except timeout. As it uses the same console code as the f10 console, things like nick completion or a scroll buffer basically come for free. The terminal itself is written in a general way so that adding a client version later on is just about implementing an interface. Fatal errors are printed after the console exists and the ncurses terminal buffer gets cleaned up with endwin(), so that the error still remains visible. The server owner can chose their username their entered text will have in chat and where players can send PMs to. Once the username is secured with a password to prevent anybody to take over the server, the owner can execute admin tasks over the console. This change includes a contribution by @kahrl who has improved ncurses library detection.
has (semi-)exclusive access to the area. There are 3 groups of privileges introduced by advtrains: ## Trains For a player to build his own trains and driving them, the player needs the 'train_operator' privilege. This privilege no longer allows him to control any train, only the ones that he owns or that he is whitelisted on. The owner of a wagon can write a whitelist which players are allowed to operate his wagon using the wagon properties dialog. Players having the 'train_admin' privilege can always drive, build and destroy any train. ## Tracks* The area 1 node around and 4 nodes up from each track node is protected. Players that don't have the 'track_builder' privilege can not build or dig (or modify) anything inside this area. If a player has this privilege and tries to modify anything that is in the area of a track node which is protected from him, he also can not do this. (that said, while checking protection, the area around a track is treated as the track node itself) Note that having 'protection_bypass' automatically implies 'track_builder' due to internal engine mechanics. (see comments in source code) ## Turnouts and Signals* Players without the 'railway_operator' privilege can not operate signals and turnouts. * If the configuration option 'advtrains_allow_build_to_owner' is set, an exception applies to players missing the required privileges when they are in a protected area that they have access to. Whether the area is protected from others is checked by checking for protection against a dummy player called '*dummy*' ## Privileges of extensions: * atlatc: This privilege allows to create and modify LUA code in LuaATC rails added by the advtrains_luaautomation mod, as well as to create and manage code environments. * interlocking: This privilege allows to build, set up, configure and control all sorts of interlocking equipment. Players without this privilege are still allowed to set and cancel routes (under the condition that they have train_operator).