Prohibit false players
最近,一些坏人给你的服务器添加了假人,一个ID重复在线,然后在线人数将从几个变为几百个,然后官方快速阻止你的服务器IP,这个插件似乎可以防止这样的黑客,你知道代码,你可以看到插件,试试看,我不太了解这些。

using Oxide.Core;
using System.Collections.Generic;
namespace Oxide.Plugins
{
    [Info("NONPC", "QQ70002340", "0.0.2")]
    class NONPC : RustPlugin
    {
        void OnServerInitialized()
        {
            timer.Every(30f, () => CheckPlayers());
        }

        void CheckPlayers()
        {
            List<BasePlayer> FakeListed = new List<BasePlayer>();
            BasePlayer.activePlayerList.ForEach(p =>
            {
                if (!p.userID.IsSteamId())
                    FakeListed.Add(p);
            });

            if (FakeListed.Count > 0)
            {
                FakeListed.ForEach(f =>
                {
                    if (BasePlayer.activePlayerList.Contains(f))
                    {
                        PrintWarning($"Fake player {f.displayName} ({f.userID}) was removed from Active Player List");
                        BasePlayer.activePlayerList.Remove(f);
                    }
                });
            }
        }
    }
}​
Please help us to see if this plugin can effectively prevent dummies, and if there is no malicious code, will it affect the stability and speed of the server?

Merged post

 @Orang @Wulf

Merged post

Recently, some bad guys have added dummies to your server. An ID duplicates online, and the number of people online will change from several to hundreds. Then the official quickly blocked your server IP. This plug-in seems to prevent such hackers. You know the code, you can see the plug-in. Try it. I don't know much about this.
        private void OnServerInitialized()
        {
            timer.Every(30f, CheckPlayers);
        }

        private void CheckPlayers()
        {
            foreach (var player in BasePlayer.activePlayerList.ToList())
            {
                if (player.userID.IsSteamId() == false)
                {
                    BasePlayer.activePlayerList.Remove(player);
                }
            }
        }


@biubiu543
In response to Orange ():
private void OnServerInitialized() { timer.Every(30f, CheckPlayers);...
Can your plug-in prevent dummies from being added to your server? Now some people use hacker technology to go to your server, can increase the number of people to hundreds in an instant, and then your server IP is immediately blocked by the rust official, do you have any way to prevent this hacker behavior?

Merged post

@
Orange