Beispiel #1
0
        public async Task InsertSuspect(string uplayId, string originalNick, ulong reporterID, ulong discordWhereAsked)
        {
            BanTreeAccess.Wait();
            BanData bd = new BanData(originalNick, uplayId, reporterID, discordWhereAsked);

            bds.OrigNickToUplay.Add(originalNick, uplayId);
            bds.BanDict.Add(uplayId, bd);
            BanTreeAccess.Release();
            await SuspectFirstCheck(uplayId);
        }
Beispiel #2
0
        public BanData QueryBanData(string oldNickname)
        {
            BanData ret = null;

            BanTreeAccess.Wait();
            if (bds.OrigNickToUplay.ContainsKey(oldNickname))
            {
                string uplayId = bds.OrigNickToUplay[oldNickname];
                if (!bds.BanDict.ContainsKey(uplayId))
                {
                    // Internal consistency error.
                    BanTreeAccess.Release();
                    throw new Exception();
                }
                else
                {
                    ret = bds.BanDict[uplayId];
                }
            }
            BanTreeAccess.Release();
            return(ret);
        }
Beispiel #3
0
        public string BuildBanReport(BanData newlyBannedUser)
        {
            string statsDBUrl = StatsDB.BuildURL(newlyBannedUser.OriginalUplayName, newlyBannedUser.UplayId);

            return($"Podezrely {newlyBannedUser.OriginalUplayName} dostal ban. Clen Discordu <@{newlyBannedUser.ReporterId}> mel pravdu! Cheateruv profil na StatsDB: {statsDBUrl} .");
        }