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.
2024-01-16 21:04:35 +00:00
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.
2024-01-05 20:58:24 +00:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
2023-09-10 08:40:25 -04:00
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.
2023-09-02 19:46:52 +02:00
Patric Stout
01f55eb734
Codechange: introduce week/quarter triggers for TimerGameCalendar ( #11189 )
...
This simplifies code that triggers on these periods.
2023-08-12 16:02:11 +02:00
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
2023-07-19 19:30:14 +02:00
Rubidium
f333372dd1
Codechange: let IConsoleCmdExec accept std::string
2023-06-29 06:06:15 +02:00
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
2023-06-25 12:02:32 +01:00
Rubidium
d4c2043294
Codechange: remove a number of unneeded c_str() calls
2023-06-15 22:14:45 +02:00
axet
60540f7df6
Change: Allow dedicated server to use threaded saves. ( #10787 )
...
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
2023-05-21 19:55:12 +02:00
Rubidium
f74e26ca7e
Codechange: replace error/usererror printf variant with fmt variant and rename
2023-04-25 17:55:09 +02:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
2023-04-15 13:58:55 +02:00
Peter Nelson
47e12a8790
Codechange: Check that CompanyMask fits into 16 bits during compilation.
2023-04-07 22:09:55 +01:00
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.
2023-01-14 21:15:23 +01:00
Michael Lutz
d85348b1d1
Codechange: Template the command callback function type to allow unpacked arguments.
2021-12-16 22:28:32 +01:00
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
4f3ea3907e
Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).
2021-12-16 22:28:32 +01:00
Michael Lutz
ccefa76a46
Codechange: Template DoCommandPInternal.
2021-12-16 22:28:32 +01:00
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.
2021-12-16 22:28:32 +01:00
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.
2021-12-16 22:28:32 +01:00
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
2021-12-16 22:28:32 +01:00
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
2021-12-16 22:28:32 +01:00
dP
31cf9e888b
Add: [Network] external chat messages for remote admins ( #9563 )
2021-09-19 23:09:06 +02:00
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>
2021-09-19 21:52:46 +01:00
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.
2021-08-23 19:38:02 +02:00
Michael Lutz
fff09a4af2
Fix d9c1d18f2: Wrong format string for console disconnect message.
2021-08-19 19:56:00 +02:00
dP
2e6a77a78a
Fix: connecting with the same name thrice hangs the server ( #9485 )
2021-08-16 11:09:54 +02:00
Patric Stout
1ef4d3cf19
Remove: COMPANY_INFO packets and related code ( #9475 )
2021-08-14 23:24:02 +02:00
Patric Stout
508e465b59
Add: synchronize server name to clients and display in Online Players GUI ( #9472 )
2021-08-14 10:19:40 +02:00
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.
2021-08-10 20:03:13 +02:00
Patric Stout
f4dd2d88c7
Feature: raise the maximum NewGRF limit to 255
2021-07-11 12:16:07 +02:00
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.
2021-07-10 20:17:07 +02:00
rubidium42
981cd0197a
Codechange: [Network] Use std::string for the client name in the network server
2021-06-15 06:13:00 +02:00
rubidium42
a8b3afb236
Codechange: [Network] Use string_view for network compatability check
2021-06-15 06:13:00 +02:00
rubidium42
667301e3ec
Codechange: [Network] Make hostname/client IP return strings instead of a C-string
2021-06-15 06:13:00 +02:00
rubidium42
d9c1d18f2b
Change: improve some of the console messages related to networking (make them more uniform) and convert to fmt
2021-06-13 15:25:31 +02:00
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
2021-06-13 12:45:45 +02:00
rubidium42
bb8fd00760
Cleanup: [Network] Remove C-string Recv_string and its last use
2021-06-10 21:53:19 +02:00
Patric Stout
5e44da3010
Fix ef991b17: server was trying to free() a packet created with "new CommandPacket()" ( #9334 )
2021-06-03 22:07:44 +02:00
rubidium42
e3c9ed4d15
Codechange: [Network] Use std::string to determine an unique name for clients
2021-05-30 00:01:49 +02:00
rubidium42
fd95736bac
Codechange: [Network] Use std::string for server side logic of kicking and banning clients
2021-05-30 00:01:49 +02:00
rubidium42
f0e1cd0129
Codechange: [Network] Let server rcon result use std::string
2021-05-30 00:01:49 +02:00
rubidium42
8b9f1147df
Codechange: [Network] Let server changing a client name use std::string
2021-05-30 00:01:49 +02:00
rubidium42
ef991b1772
Codechange: [Network] Use std::string in CommandPacket
2021-05-29 19:02:18 +02:00
rubidium42
4d246cda73
Codechange: [Network] Let NetworkClientInfo use std::string
2021-05-16 10:07:51 +02:00
rubidium42
83679c0e57
Codechange: [Network] Use std::string to populate the client list for company stats
2021-05-16 10:07:51 +02:00
rubidium42
fab120ee83
Codechange: [Network] Let chat communication use std::string
2021-05-15 10:20:50 +02:00
rubidium42
ae85af98eb
Codechange: Use std::string GetString where convenient
2021-05-15 10:20:50 +02:00