some improvements, cleanup trivias and typings when blacklisting a server

This commit is contained in:
Master Kwoth
2016-03-05 12:20:27 +01:00
parent 91affc7cef
commit b8dad9a1cd
7 changed files with 36 additions and 25 deletions

View File

@ -480,6 +480,11 @@ namespace NadekoBot.Modules {
}
NadekoBot.Config.ServerBlacklist.Add(server.Id);
NadekoBot.SaveConfig();
//cleanup trivias and typeracing
Classes.Trivia.TriviaGame trivia;
Commands.Trivia.RunningTrivias.TryRemove(server.Id, out trivia);
Commands.TypingGame typeracer;
Commands.SpeedTyping.RunningContests.TryRemove(server.Id, out typeracer);
await e.Channel.SendMessage($"`Sucessfully blacklisted server {server.Name}`");
});
});