KarlOfDuty/SCPDiscord

Add /listranked

KarlOfDuty opened this issue · 7 comments

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

Closes #85

Is it possible to use Reflection to handle it ?

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.

Another approach to go through

var permissionHandler = ServerStatic.GetPermissionsHandler();
if (permissionHandler != null)
{
				var userGroup = permissionHandler.GetUserGroup(player.UserId);
				// ...
}

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

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

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.