Commit Graph

351 Commits (0b7410d979118b6e0562ffbdabb23ee619f59c92)

Author SHA1 Message Date
Patric Stout 0b7410d979
Codechange: compile-time validate the string format of IConsolePrint (#11804)
This means we can no longer use runtime picking what string to use.
5 months ago
Peter Nelson 7a5106042f
Codechange: Use CompanyMask and company group statistics for auto clean tests. (#11693)
This function does not need to know how many vehicles there are, only that there is at least one.
5 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 9 months ago
Tyler Trahan fca2b37726 Codechange: Move Ticks into their own class 9 months ago
Bouke Haarsma 7e54418022
Codechange: workaround CMake/Xcode duplicate file name issue (#11186)
Having a library with files with the same name isn't supported in CMake's Xcode project file generation: https://gitlab.kitware.com/cmake/cmake/-/issues/20501. One of the files is renamed to work around this bug.
9 months ago
Patric Stout 01f55eb734
Codechange: introduce week/quarter triggers for TimerGameCalendar (#11189)
This simplifies code that triggers on these periods.
10 months ago
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
11 months ago
Rubidium f333372dd1 Codechange: let IConsoleCmdExec accept std::string 12 months ago
Jonathan G Rennison 4f6d75f97d Fix #11016: Defer deletion of client and server game socket handlers
This fixes various use after free scenarios in error handling paths
12 months ago
Rubidium d4c2043294 Codechange: remove a number of unneeded c_str() calls 1 year ago
axet 60540f7df6 Change: Allow dedicated server to use threaded saves. (#10787)
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
1 year ago
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Patric Stout 3ebc7ad16e Codechange: migrate all game-time-related timers to the new framework 1 year ago
Peter Nelson 47e12a8790 Codechange: Check that CompanyMask fits into 16 bits during compilation. 1 year ago
Rubidium 90f1768006 Codechange: add non-nullptr asserts in cases where it should never be nullptr
Though where similar calls are checked for nullptr as in those instances of
the use of that function it can actually return nullptr. In other words, write
down the assumption that the function never returns nullptr in an assert.
1 year ago
Michael Lutz d85348b1d1 Codechange: Template the command callback function type to allow unpacked arguments. 3 years ago
Michael Lutz 13528bfcd0 Codechange: Un-bitstuff all remaining commands. 3 years ago
Michael Lutz 4f3ea3907e Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID). 3 years ago
Michael Lutz ccefa76a46 Codechange: Template DoCommandPInternal. 3 years ago
Michael Lutz 0f64ee5ce1 Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz a05fd7aa50 Change: [Network] Transfer command data as serialized byte stream without fixed structure.
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
3 years ago
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 3 years ago
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 3 years ago
dP 31cf9e888b
Add: [Network] external chat messages for remote admins (#9563) 3 years ago
Patric Stout d9f8ed7bdf
Add: [Network] On join, log the ClientID + IP + Name clearly (#9558)
Additionally, reword the disconnect to match connect / join messages.

Co-authored-by: Berbe <4251220+Berbe@users.noreply.github.com>
3 years ago
Patric Stout e31b5d3870
Fix #9490: [Network] a full server couldn't be queried either (#9508)
You can now still query a full server, as long as the maximum
amount of allowed connections isn't reached. This means that as
long as there are not 255 clients connected to a server, you can
always connect to query.
3 years ago
Michael Lutz fff09a4af2 Fix d9c1d18f2: Wrong format string for console disconnect message. 3 years ago
dP 2e6a77a78a
Fix: connecting with the same name thrice hangs the server (#9485) 3 years ago
Patric Stout 1ef4d3cf19
Remove: COMPANY_INFO packets and related code (#9475) 3 years ago
Patric Stout 508e465b59
Add: synchronize server name to clients and display in Online Players GUI (#9472) 3 years ago
Patric Stout 4c1ea4020d
Change: remove the ability to control "max spectators" (#9466)
Soon we will make "join game" join the game as spectator first,
so limiting the amount of spectators makes no sense anymore in
that context. Not sure it ever did make sense.
3 years ago
Patric Stout f4dd2d88c7 Feature: raise the maximum NewGRF limit to 255 3 years ago
Patric Stout 61fdef8457 Remove: old server announcement to Master Server
As we now use the Game Coordinator for announcements, there is no
longer a need to use the Master Server for this.
3 years ago
rubidium42 981cd0197a Codechange: [Network] Use std::string for the client name in the network server 3 years ago
rubidium42 a8b3afb236 Codechange: [Network] Use string_view for network compatability check 3 years ago
rubidium42 667301e3ec Codechange: [Network] Make hostname/client IP return strings instead of a C-string 3 years ago
rubidium42 d9c1d18f2b Change: improve some of the console messages related to networking (make them more uniform) and convert to fmt 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
rubidium42 bb8fd00760 Cleanup: [Network] Remove C-string Recv_string and its last use 3 years ago
Patric Stout 5e44da3010
Fix ef991b17: server was trying to free() a packet created with "new CommandPacket()" (#9334) 3 years ago
rubidium42 e3c9ed4d15 Codechange: [Network] Use std::string to determine an unique name for clients 3 years ago
rubidium42 fd95736bac Codechange: [Network] Use std::string for server side logic of kicking and banning clients 3 years ago
rubidium42 f0e1cd0129 Codechange: [Network] Let server rcon result use std::string 3 years ago
rubidium42 8b9f1147df Codechange: [Network] Let server changing a client name use std::string 3 years ago
rubidium42 ef991b1772 Codechange: [Network] Use std::string in CommandPacket 3 years ago
rubidium42 4d246cda73 Codechange: [Network] Let NetworkClientInfo use std::string 3 years ago
rubidium42 83679c0e57 Codechange: [Network] Use std::string to populate the client list for company stats 3 years ago
rubidium42 fab120ee83 Codechange: [Network] Let chat communication use std::string 3 years ago
rubidium42 ae85af98eb Codechange: Use std::string GetString where convenient 3 years ago