|
|
@ -914,7 +914,7 @@ DEF_CONSOLE_CMD(ConClientNickChange)
|
|
|
|
DEF_CONSOLE_CMD(ConJoinCompany)
|
|
|
|
DEF_CONSOLE_CMD(ConJoinCompany)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (argc < 2) {
|
|
|
|
if (argc < 2) {
|
|
|
|
IConsolePrint(CC_HELP, "Request joining another company. Usage: 'join <company-id> [<password>]'.");
|
|
|
|
IConsolePrint(CC_HELP, "Request joining another company. Usage: 'join <company-id>'.");
|
|
|
|
IConsolePrint(CC_HELP, "For valid company-id see company list, use 255 for spectator.");
|
|
|
|
IConsolePrint(CC_HELP, "For valid company-id see company list, use 255 for spectator.");
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -943,9 +943,8 @@ DEF_CONSOLE_CMD(ConJoinCompany)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Check if the company requires a password */
|
|
|
|
if (!info->CanJoinCompany(company_id)) {
|
|
|
|
if (NetworkCompanyIsPassworded(company_id) && argc < 3) {
|
|
|
|
IConsolePrint(CC_ERROR, "You are not allowed to join this company.");
|
|
|
|
IConsolePrint(CC_ERROR, "Company {} requires a password to join.", company_id + 1);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -953,7 +952,7 @@ DEF_CONSOLE_CMD(ConJoinCompany)
|
|
|
|
if (_network_server) {
|
|
|
|
if (_network_server) {
|
|
|
|
NetworkServerDoMove(CLIENT_ID_SERVER, company_id);
|
|
|
|
NetworkServerDoMove(CLIENT_ID_SERVER, company_id);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
NetworkClientRequestMove(company_id, NetworkCompanyIsPassworded(company_id) ? argv[2] : "");
|
|
|
|
NetworkClientRequestMove(company_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|