summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/console_cmds.cpp2
-rw-r--r--src/network/network_func.h2
-rw-r--r--src/network/network_server.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 39a52f0b5..e86e2a0d9 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -724,7 +724,7 @@ DEF_CONSOLE_CMD(ConClientNickChange)
return true;
}
- if (!NetworkServerChangeClientName(client_id, client_name.c_str())) {
+ if (!NetworkServerChangeClientName(client_id, client_name)) {
IConsoleError("Cannot give a client a duplicate name");
}
diff --git a/src/network/network_func.h b/src/network/network_func.h
index d30616fd0..a50166e2a 100644
--- a/src/network/network_func.h
+++ b/src/network/network_func.h
@@ -73,7 +73,7 @@ void NetworkServerUpdateGameInfo();
void NetworkServerShowStatusToConsole();
bool NetworkServerStart();
void NetworkServerNewCompany(const Company *company, NetworkClientInfo *ci);
-bool NetworkServerChangeClientName(ClientID client_id, const char *new_name);
+bool NetworkServerChangeClientName(ClientID client_id, const std::string &new_name);
void NetworkServerDoMove(ClientID client_id, CompanyID company_id);
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index fe585c03c..b770dbda3 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1719,7 +1719,7 @@ bool NetworkFindName(char *new_name, const char *last)
* @param new_name the new name for the client
* @return true iff the name was changed
*/
-bool NetworkServerChangeClientName(ClientID client_id, const char *new_name)
+bool NetworkServerChangeClientName(ClientID client_id, const std::string &new_name)
{
/* Check if the name's already in use */
for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) {