Exemple #1
0
        internal void Initialize()
        {
            System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.Highest;
            R.Log("[Anticheat] is loading...");

            aconf = RowacCore.LoadConfig <Config>(Path.Combine(RowacCore.rowacFolder, "anticheat.json"));
            if (aconf != null && aconf.enabled)
            {
                takeCoordsTimer          = new Timer(aconf.checkInterval * 1000);
                takeCoordsTimer.Elapsed += takeCoordsEvent;
                takeCoordsTimer.Start();
                R.Log("[Anticheat] loaded!");
            }
            else
            {
                R.Log("[Anticheat] disabled! Check your config.");
            }
        }
Exemple #2
0
        // TODO: remove ping and guid on user disconnect
        private void ParsePing(string ping, ulong steamID)
        {
            try
            {
#if DEBUG
                R.Log("Ping: " + ping);
#endif

                string[] data = ping.Split('|'); // [1] - GUID; [2] - ShortTime
                string   guid = data[1];

                //if (RowAnticheat.userGuids[steamID] == guid)
                //RustAPI.KickUser(RustAPI.FindByUserID(steamID), NetError.ApprovalDenied, true);

                RowacCore.pingTimeTable[steamID] = RowacCore.GetTimeInSeconds();
                R.Log(string.Format("[Ping] {0} ({1}) - {2}", steamID, guid, RowacCore.pingTimeTable[steamID]));
            }
            catch (Exception ex) { R.LogEx("Ping", ex); }
        }
Exemple #3
0
 public static void Init()
 {
     RowacCore.Init();
 }