KarlOfDuty / SCPDiscord

A Northwood plugin which adds remote interaction to an SCP:SL server through Discord.
https://karlofduty.com
GNU General Public License v3.0
12 stars 13 forks source link

Add /listranked #131

Open KarlOfDuty opened 5 months ago

KarlOfDuty commented 5 months ago

Same as /list but only showing online users who have server roles.

Closes #85

KarlOfDuty commented 5 months ago

Blocked by https://github.com/northwood-studios/NwPluginAPI/issues/240

TiBarification commented 4 months ago

Is it possible to use Reflection to handle it ?

KarlOfDuty commented 4 months ago

It is, but I don't want to resort to such hacks. I want to rely on what is officially provided by the modding api.

TiBarification commented 4 months ago

Another approach to go through

var permissionHandler = ServerStatic.GetPermissionsHandler();
if (permissionHandler != null)
{
                var userGroup = permissionHandler.GetUserGroup(player.UserId);
                // ...
}
KarlOfDuty commented 4 months ago

It was some time ago now but im pretty sure I tried that and it didnt work.

TiBarification commented 4 months ago

Anyway it is requires to go through iteration instead of direct calling object, and thats not nice.

KarlOfDuty commented 4 months ago

Whoops didnt mean to delete that comment, but basically, im sick so cant verify today but im pretty sure it always returned null or an empty object.