Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concolde cmd: move clients between companies (inc. Spectator) #1363

Closed
DorpsGek opened this issue Oct 23, 2007 · 15 comments
Closed

concolde cmd: move clients between companies (inc. Spectator) #1363

DorpsGek opened this issue Oct 23, 2007 · 15 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

dihedral opened the ticket and wrote:

adds a console command (move) and a network command (PACKET_CLIENT_MOVE)

console cmd syntax
move []
if company-id is omitted, client is made a spectator

thanks to TB for a lot of patience and advise :-)

Attachments

Reported version: 0.5.3
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1363
@DorpsGek
Copy link
Member Author

dihedral wrote:

sorry - not 0.5.3, its patch for r11333


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2494

@DorpsGek
Copy link
Member Author

dihedral wrote:

changes:
* added comments :-P
* display a message when company-id has been changed for a client
* fix: check against ActivePlayerCount()-1 as player_index starts at 0
* use PLAYER_SPECTATOR instead of 255

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2498

@DorpsGek
Copy link
Member Author

dihedral wrote:

a thought that just came to me mind:
using this patch, reset_company can be performed even if a company has clients, simply by moving all clients in that company to Spectator :-)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2499

@DorpsGek
Copy link
Member Author

dihedral wrote:

this version has even less chances of a client getting disconnected or having an assertion, if the client should manage to 'click' a button or perform an action between moving and the move being processed.

changes:
* use MakeWholeScreenDirty() instead of UpdateWindows(); DeleteAllNonVitalWindows();
* check for PLAYER_NEW_COMPANY and PLAYER_INACTIVE_CLIENT before outputting a message, to prevend messages from clients joining a company normally!

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2503

@DorpsGek
Copy link
Member Author

dihedral wrote:

found a bug, will update tomorrow...


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2507

@DorpsGek
Copy link
Member Author

Bjarni wrote:

My first thought when I see this patch is: what about password protected companies? Isn't this a way to create a backdoor into protected companies?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2508

@DorpsGek
Copy link
Member Author

dihedral wrote:

it is a server side console command... meaning you need access to the server either directly or via rcon...
i.e. the command is not available to "normal" users

attached version fixes 2 bugs:

  1. it was possible to move a client into a non existant company, causing desyncs, money overflows
  2. when resetting one of the companies between min and currently max available, it was not possible to move a client to the max available company!

added: when a client should ever receive a packet about moving a client to a non existant company which is still IsValidPlayer(), the client is moved to spectator

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2509

@DorpsGek
Copy link
Member Author

skidd13 wrote:

I'm wondering if the patch is AI safe. Hmm how would an AI react if it is moved to spectator? :D


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2533

@DorpsGek
Copy link
Member Author

dihedral wrote:

would it even notice?

btw. could some admin please change "Reported Version" for me? it's not 0.5.3 :-)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2535

@DorpsGek
Copy link
Member Author

Bjarni wrote:

"Reported Version" is the only thing I can't change so it's the only thing were you aren't allowed at all to put incorrect info :P


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2544

@DorpsGek
Copy link
Member Author

dihedral wrote:

not even in the database??


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2545

@DorpsGek
Copy link
Member Author

skidd13 wrote:

I may point at some coding style conflicts. ;)
http://wiki.openttd.org/index.php/Coding_style# Variables
-> Declare variables upon first usage.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment2558

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 9, 2008

yorick wrote:

I've made a version of the patch which asks the client for confirmation first, before moving.
But if the client isn't responding to the request, the move gets executed without client confirmation.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment3626

@DorpsGek
Copy link
Member Author

Ammler wrote:

Updated to revision r12767.

The idea of the move function is to force the client in an other company. Mostly spectator, so you can stop him building or what else but keep him on the server for further discussing. An admin don't need confirmation of the player.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363#comment3937

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Implemented

Somewhere a while ago, I think, or so


This comment was imported from FlySpray: https://bugs.openttd.org/task/1363

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant