summaryrefslogtreecommitdiff
path: root/src/network/network_server.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-04-17 11:39:46 +0000
committersmatz <smatz@openttd.org>2010-04-17 11:39:46 +0000
commitcd20724d201b5b04c8dfac49b6b885ea988165ed (patch)
treece842b5635d89819a430206700363f26cb250d16 /src/network/network_server.cpp
parent96a2cbb58ef913a55d24e7b607be61c1090ee611 (diff)
downloadopenttd-cd20724d201b5b04c8dfac49b6b885ea988165ed.tar.xz
(svn r19651) -Fix [FS#3745]: when a company is sold, move connected clients to spectators
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r--src/network/network_server.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index f4db459cb..b717395a7 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1099,9 +1099,9 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
}
break;
case DESTTYPE_TEAM: {
- bool show_local = true; // If this is false, the message is already displayed
- /* on the client who did sent it.
- * Find all clients that belong to this company */
+ /* If this is false, the message is already displayed on the client who sent it. */
+ bool show_local = true;
+ /* Find all clients that belong to this company */
ci_to = NULL;
FOR_ALL_CLIENT_SOCKETS(cs) {
ci = cs->GetInfo();
@@ -1694,27 +1694,6 @@ void NetworkServerMonthlyLoop()
NetworkAutoCleanCompanies();
}
-void NetworkServerChangeOwner(Owner current_owner, Owner new_owner)
-{
- /* The server has to handle all administrative issues, for example
- * updating and notifying all clients of what has happened */
- NetworkClientInfo *ci = NetworkFindClientInfoFromClientID(CLIENT_ID_SERVER);
-
- /* The server has just changed from owner */
- if (current_owner == ci->client_playas) {
- ci->client_playas = new_owner;
- NetworkUpdateClientInfo(CLIENT_ID_SERVER);
- }
-
- /* Find all clients that were in control of this company, and mark them as new_owner */
- FOR_ALL_CLIENT_INFOS(ci) {
- if (current_owner == ci->client_playas) {
- ci->client_playas = new_owner;
- NetworkUpdateClientInfo(ci->client_id);
- }
- }
-}
-
const char *GetClientIP(NetworkClientInfo *ci)
{
return ci->client_address.GetHostname();