Author Topic: [Online] Is the player authenticated?  (Read 632 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

[Online] Is the player authenticated?
« on: June 03, 2017, 04:16:49 PM »

In online games I need to know if the player is authorized (enter password) to prevent other players from using their function.

It would be nice something like: "player_x(pl).is_unlocked()"

Offline DrSuperGood

Re: [Online] Is the player authenticated?
« Reply #1 on: June 03, 2017, 10:28:32 PM »
Not that easy to implement as only the server truly knows that and can be trusted. One would need to sync the results with all clients before permitting the script to execute any further.

Offline Yona-TYT

Re: [Online] Is the player authenticated?
« Reply #2 on: June 03, 2017, 10:58:17 PM »

I need this to be able to advance in the divided regions scenario.  :-[
Otherwise it would be useless, since the players have free access to the functions that I want to create.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: [Online] Is the player authenticated?
« Reply #3 on: June 12, 2017, 06:15:48 AM »
@DrSuperGood: Scenarios only run on the server, so there is a chance to get this working.
In online games I need to know if the player is authorized (enter password) to prevent other players from using their function.
@Yona: Can you please be more specific with respect to 'their function' ? What do you want to achieve?

Running scripts from clicks in scenario info window does not work currently for clients in network mode. It only works on the server itself.

In order to make it work in network mode, there should be some safety net in order to decide whether a script call is legitimate. Otherwise a modified client could sent arbitrary requests to spoil the scenario.
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT

Re: [Online] Is the player authenticated?
« Reply #4 on: June 13, 2017, 11:46:46 AM »
Running scripts from clicks in scenario info window does not work currently for clients in network mode. It only works on the server itself.
I suppose that is the problem, maybe some kind of interaction is needed that shows the window to enter the password.

Offline Yona-TYT

Re: [Online] Is the player authenticated?
« Reply #5 on: June 15, 2017, 01:33:39 AM »
@Yona: Can you please be more specific with respect to 'their function' ? What do you want to achieve?

Running scripts from clicks in scenario info window does not work currently for clients in network mode. It only works on the server itself.

In order to make it work in network mode, there should be some safety net in order to decide whether a script call is legitimate. Otherwise a modified client could sent arbitrary requests to spoil the scenario.
I was hoping this would work. :-[