Esempio n. 1
0
        public async Task <Boolean> CheckUserAsync(String name)
        {
            String  mdData = (await SrWiki.GetPageAsync("botconfig/botterminator/banned")).MarkdownContent;
            BanList b      = JsonConvert.DeserializeObject <BanList>(mdData);

            return(b.Items.Contains(name));
        }
Esempio n. 2
0
        public async Task UpdateUserAsync(String name, Boolean value)
        {
            String  mdData = (await SrWiki.GetPageAsync("botconfig/botterminator/banned")).MarkdownContent;
            BanList b      = JsonConvert.DeserializeObject <BanList>(mdData);

            b.Items.Add(name);
            await SrWiki.EditPageAsync("botconfig/botterminator/banned", JsonConvert.SerializeObject(b));
        }