14 #include "../stdafx.h"
15 #include "../strings_func.h"
16 #include "../date_func.h"
20 #include "../command_func.h"
21 #include "../company_base.h"
22 #include "../console_func.h"
23 #include "../core/pool_func.hpp"
24 #include "../map_func.h"
26 #include "../game/game.hpp"
28 #include "../safeguards.h"
142 GetString(str, strid,
lastof(str));
144 DEBUG(net, 1,
"[admin] the admin '%s' (%s) made an error and has been disconnected. Reason: '%s'", this->
admin_name, this->
admin_version, str);
244 p->
Send_string(cs == NULL ?
"" : const_cast<NetworkAddress &>(cs->client_address).GetHostname());
327 GetString(company_name, STR_COMPANY_NAME,
lastof(company_name));
330 GetString(manager_name, STR_PRESIDENT_NAME,
lastof(manager_name));
363 GetString(company_name, STR_COMPANY_NAME,
lastof(company_name));
366 GetString(manager_name, STR_PRESIDENT_NAME,
lastof(manager_name));
407 FOR_ALL_COMPANIES(company) {
425 for (uint i = 0; i < 2; i++) {
448 FOR_ALL_COMPANIES(company) {
454 for (uint i = 0; i < NETWORK_VEH_END; i++) {
458 for (uint i = 0; i < NETWORK_VEH_END; i++) {
618 for (uint i = 0; i <
CMD_END; i++) {
680 return this->
SendError(NETWORK_ERROR_WRONG_PASSWORD);
688 return this->
SendError(NETWORK_ERROR_ILLEGAL_PACKET);
714 return this->
SendError(NETWORK_ERROR_ILLEGAL_PACKET);
737 const NetworkClientSocket *cs;
738 if (d1 == UINT32_MAX) {
747 cs = NetworkClientSocket::GetByClientID((
ClientID)d1);
756 if (d1 == UINT32_MAX) {
757 FOR_ALL_COMPANIES(company) {
784 return this->
SendError(NETWORK_ERROR_ILLEGAL_PACKET);
802 case NETWORK_ACTION_CHAT:
803 case NETWORK_ACTION_CHAT_CLIENT:
804 case NETWORK_ACTION_CHAT_COMPANY:
805 case NETWORK_ACTION_SERVER_MESSAGE:
811 return this->
SendError(NETWORK_ERROR_ILLEGAL_PACKET);
889 if (company == NULL) {
890 DEBUG(net, 1,
"[admin] Empty company given for update");
911 if (company == NULL)
return;
940 if (from_admin)
return;
945 as->
SendChat(action, desttype, client_id, msg, data);
1042 default: NOT_REACHED();