diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-14 17:38:05 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-30 10:15:22 +0200 |
commit | 8c273ed598f59e18acb1c0bcbc9bc34beb307ecb (patch) | |
tree | 66cda2fe900db84e99b3eb079eeba8d66b1b0b18 /src/network/network_admin.h | |
parent | e58581f1f825da4d318b0b09fc12726788e95ccc (diff) | |
download | openttd-8c273ed598f59e18acb1c0bcbc9bc34beb307ecb.tar.xz |
Codechange: [Network] Let admin-console use std::string(_view)
Diffstat (limited to 'src/network/network_admin.h')
-rw-r--r-- | src/network/network_admin.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/network_admin.h b/src/network/network_admin.h index 189acb6f9..9d7f0eef4 100644 --- a/src/network/network_admin.h +++ b/src/network/network_admin.h @@ -62,12 +62,12 @@ public: NetworkRecvStatus SendCompanyStats(); NetworkRecvStatus SendChat(NetworkAction action, DestType desttype, ClientID client_id, const std::string &msg, int64 data); - NetworkRecvStatus SendRcon(uint16 colour, const char *command); - NetworkRecvStatus SendConsole(const char *origin, const char *command); + NetworkRecvStatus SendRcon(uint16 colour, const std::string_view command); + NetworkRecvStatus SendConsole(const std::string_view origin, const std::string_view command); NetworkRecvStatus SendGameScript(const std::string_view json); NetworkRecvStatus SendCmdNames(); NetworkRecvStatus SendCmdLogging(ClientID client_id, const CommandPacket *cp); - NetworkRecvStatus SendRconEnd(const char *command); + NetworkRecvStatus SendRconEnd(const std::string_view command); static void Send(); static void AcceptConnection(SOCKET s, const NetworkAddress &address); @@ -108,8 +108,8 @@ void NetworkAdminCompanyRemove(CompanyID company_id, AdminCompanyRemoveReason bc void NetworkAdminChat(NetworkAction action, DestType desttype, ClientID client_id, const std::string &msg, int64 data = 0, bool from_admin = false); void NetworkAdminUpdate(AdminUpdateFrequency freq); -void NetworkServerSendAdminRcon(AdminIndex admin_index, TextColour colour_code, const char *string); -void NetworkAdminConsole(const char *origin, const char *string); +void NetworkServerSendAdminRcon(AdminIndex admin_index, TextColour colour_code, const std::string_view string); +void NetworkAdminConsole(const std::string_view origin, const std::string_view string); void NetworkAdminGameScript(const std::string_view json); void NetworkAdminCmdLogging(const NetworkClientSocket *owner, const CommandPacket *cp); |