summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
AgeCommit message (Collapse)Author
2021-07-11Add: allow setting your server visibility to "invite-only" (#9434)Patric Stout
In this mode you do register to the Game Coordinator, but your server will not show up in the public server listing. You can give your friends the invite code of the server with which they can join.
2021-07-11Feature: join servers based on their invite codePatric Stout
This removes the need to know a server IP to join it. Invite codes are small (~7 characters) indentifiers for servers, which can be exchanged with other players to join the servers.
2021-06-13Codechange: improve style/writing of IConsolePrint stringsrubidium42
2021-06-13Change: do not print the '-' in front of help messages and make help ↵rubidium42
messages more uniform
2021-06-13Codechange: replace IConsolePrintF with IConsolePrint and fmt formattingrubidium42
Also make some strings more consistent with the rest of the console strings.
2021-06-13Change: unify the style of console error messages and convert to fmtrubidium42
Always start with a capital, do not add "ERROR: " in front of it.
2021-06-13Change: not performing a command is worthy of an error, not a warningrubidium42
If a command cannot be executed for whatever reason, it makes no sense to call it a warning. Something has been done wrong. Also make writing of these error message consistent while changing their "type".
2021-06-10Change: allow pause/unpause console command in single player too (#9342)Patric Stout
2021-06-10Codechange: [ContentInfo] Use std::string instead of string buffersrubidium42
2021-05-30Codechange: [Network] Use std::string for server side logic of kicking and ↵rubidium42
banning clients
2021-05-30Codechange: [Network] Let server changing a client name use std::stringrubidium42
2021-05-14Codechange: use thread safe time functionsrubidium42
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
2021-05-14Codechange: [Network] Pass passwords as std::string to the network coderubidium42
2021-05-14Codechange: [Network] Make company state password std::stringrubidium42
2021-05-13Codechange: move client name in settings to std::stringrubidium42
2021-05-13Codechange: move hostnames in settings to std::stringrubidium42
2021-05-10Fix: leaking file descriptorsRubidium
2021-05-08Change: Use gender-neutral pronouns in console command messages (and ↵William Davis
comments) (#9203)
2021-05-02Fix #9147: Delay making screenshots until the next draw tick as we may not ↵Michael Lutz
access the video buffer from the game thread.
2021-05-01Fix #6598: Do not disconnect before company number validationrubidium42
NetworkClientConnectGame already does a NetworkDisconnect, so no reason to do it here
2021-05-01Change: [Console] Show help when passing invalid company numberrubidium42
2021-04-29Cleanup: Remove old FiosList helper methods. (#9139)PeterN
2021-04-29Change: [Network] Encapsulate logic about the connection string to the ↵rubidium42
network code (#23)
2021-04-29Codechange: use NetworkAddress instead of two host/port variables where possiblePatric Stout
This also means we no longer need last_host/last_port, but can just use a single last_joined setting.
2021-04-27Codechange: move all NetworkGameInfo related functions to a single filePatric Stout
It currently was a bit scattered over the place. Part of NetworkGameInfo is also the GRF Identifiers that goes with it.
2021-04-27Codechange: [Network] Do not leak os_abstraction.h via network_funcrubidium42
2021-04-24Codechange: Use std::string in console commands/aliases registration, and ↵Loïc Guilloux
std::map instead our sorted linked list (#9057) * Codechange: Use std::string in console commands and aliases registration * Codechange: Use std::map to register console commands * Codechange: Use std::map to register console aliases * Cleanup: Remove now unused function
2021-04-24Change: [Network] Prevent invalid client names being sent to the server when ↵rubidium42
changing it using the console/settings
2021-04-20Codechange: split ParseConnectionString into two functionsPatric Stout
One also looks for a company, the other doesn't. There were more uses of the latter than the first, leaving very weird code all over the place.
2021-04-12Fix #8874: show a warning when a NewGRF scan is requested multiple times ↵rubidium42
from the console (#9022)
2021-03-13Fix #8851: don't allow infinite "exec" depth in script, but limit to 10 deepPatric Stout
This means if you execute a script from a script from a script, .. for more than 10 times, it bails out now. This should be sufficient for even the most complex scripts.
2021-03-13Fix: calling "exec" from script never returnedPatric Stout
Example: exec other.script echo hello The "echo" was never executed.
2021-03-10Add: make modal windows update more smoothPatric Stout
Basically, modal windows had their own thread-locking for what drawing was possible. This is a bit nonsense now we have a game-thread. And it makes much more sense to do things like NewGRFScan and GenerateWorld in the game-thread, and not in a thread next to the game-thread. This commit changes that: it removes the threads for NewGRFScan and GenerateWorld, and just runs the code in the game-thread. On regular intervals it allows the draw-thread to do a tick, which gives a much smoother look and feel. It does slow down NewGRFScan and GenerateWorld ever so slightly as it spends more time on drawing. But the slowdown is not measureable on my machines (with 700+ NewGRFs / 4kx4k map and a Debug build). Running without a game-thread means NewGRFScan and GenerateWorld are now blocking.
2021-03-04Fix dddf885f: use IConsoleError to produce console errorsPatric Stout
2021-03-04Add: allow making heightmap screenshot via consolePatric Stout
2021-03-04Feature: allow custom width/height of screenshot via consolePatric Stout
Reworked how the screenshot command works while keeping it backwards compatible. It can now more freely understand arguments, and has the ability to make SC_DEFAULTZOOM screenshots.
2021-02-05Codechange: Apply coding style (#8640)SamuXarick
* Fix: Missing or needed spaces * Codechange: Remove space * Codechange: Remove space * Codechange: More missing spaces * Codechange: Missing spaces * Codechange: Remove space * Codechange: Remove space
2021-01-22Change: Apply some consistency to singleplayer related commentsglx22
2021-01-22Fix: Use the same safety checks as 'stop_ai' for 'reload_ai'glx22
2021-01-13Add: Console command to dump debugging information (#8548)Jonathan G Rennison
2021-01-11Change: change console command "restart" and add "reload"Patric Stout
The current "restart" command is now called "reload", as that is what it does. The old "restart" command is now called "restart", as that is what it did. As this has not been in any official release yet, this shouldn't harm any kitten.
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-12-25Fix #6468: don't store version of AIs-started-via-console in namePatric Stout
You can do: "startai myai.3", which starts version 3 of "myai". This is very useful for testing save/load code between different versions of your AI. However, when using this syntax, the AI got saved as "myai.3" as name of the AI, instead of "myai". This caused several problems, like indicating to the user the AI could not be found, but still load the AI. But in all cases, the AI never got the chance to load the saved data, making the whole reason this exists pointless. By splitting the name and version already in the console command, the code becomes simpler and AIs started this way now follow the normal flow after initialization.
2020-12-07Remove: console command "content select all" (#8363)Patric Stout
The intention of this function was that you could download everything after a filter was applied; but this never really took off. Instead, a select few people used this functionality to download every available package on BaNaNaS. This is not in the spirit of this service. Additionally, these few people were good for 70% of the consumed bandwidth of BaNaNaS.
2020-06-08Fix: Display banlist's indexes correctlyMiguel Horta
Bug introduced via commit ab711e6942
2020-02-09Fix #7993: Compile warning in kick/ban debug messagesCharles Pigott
2020-02-06Fix 5880f147: Integer width warningsNiels Martin Hansen
2020-02-04Feature #7756: Allow server to supply a reason to kicked/banned clientsBjarni Thor
This commit adds the missing feature of allowing the server owner to provide a reason for kicking/banning a client, which the client sees in a pop-up window after being kicked. The implementation extends the network protocol by adding a new network action called NETWORK_ACTION_KICKED that is capable of having an error string, unlike the other network error packages. Additionally, the kick function broadcasts a message to all clients about the kicked client and the reason for the kick.
2020-01-26Feature: NewGRF callback profiling (#7868)Niels Martin Hansen
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.