Team-Silver-Sphere / SquadJS

Squad Server Script Framework
Boost Software License 1.0
167 stars 128 forks source link

Update admin list utility to recognise eosIDs #347

Closed IgnisAlienus closed 4 months ago

IgnisAlienus commented 9 months ago

So, I updated my admins.cfg to have EOSIDs for my Admins after that whole EOS Update, guess SquadJS hasn't been pulling them this whole time. Now it does.

Thomas-Smyth commented 7 months ago

How does this work when utilising the list? A lot of the Server class seems to search the list of admins by Steam IDs still, e.g.: https://github.com/Team-Silver-Sphere/SquadJS/blob/9f9755ed059de608389229e1b72b3425e8b22e4c/squad-server/index.js#L357

Ulibos commented 7 months ago

@Thomas-Smyth I'm building a full migration to eosIDs. I'm planning to implement a mapping function that will convert steamIDs of online admins into eosIDs (non-matching IDs will be ignored instead of failing). This will allow us to support old steamID-based admin lists while people shift their stuff to eosIDs. My future PR builds upon this PR and my own: https://github.com/Team-Silver-Sphere/SquadJS/pull/352

fantinodavide commented 7 months ago

How does this work when utilising the list? A lot of the Server class seems to search the list of admins by Steam IDs still, e.g.:

https://github.com/Team-Silver-Sphere/SquadJS/blob/9f9755ed059de608389229e1b72b3425e8b22e4c/squad-server/index.js#L357

it accepts both steamID and eosID

Thomas-Smyth commented 7 months ago

How does this work when utilising the list? A lot of the Server class seems to search the list of admins by Steam IDs still, e.g.: https://github.com/Team-Silver-Sphere/SquadJS/blob/9f9755ed059de608389229e1b72b3425e8b22e4c/squad-server/index.js#L357

it accepts both steamID and eosID

How? If it's always looking up by Steam ID then it will never match on a EOSID.

fantinodavide commented 7 months ago

How does this work when utilising the list? A lot of the Server class seems to search the list of admins by Steam IDs still, e.g.: https://github.com/Team-Silver-Sphere/SquadJS/blob/9f9755ed059de608389229e1b72b3425e8b22e4c/squad-server/index.js#L357

it accepts both steamID and eosID

How? If it's always looking up by Steam ID then it will never match on a EOSID.

People will have to adjust their plugins in order to use eosID, but this PR improves how the admin lists are parsed and won't skip the lines with an eosID only, and doesn't make a specific discrimination between steamID and eosID

Ulibos commented 7 months ago

How? If it's always looking up by Steam ID then it will never match on a EOSID.

If an ID is used directly in rcon commands then it will work regardless. There are 2 plugins that will ignore eosIDs because they loop through players matching admin IDs against steamID:

  1. auto-kick-unassigned.js
  2. discord-admin-request.js

But I'm planning to address this in my next PR.

werewolfboy13 commented 7 months ago

Pending further review.