Пример #1
0
        /// <summary>
        /// Clears the early quits for a given user.
        /// </summary>
        /// <param name="c">The command argument information.</param>
        /// <param name="qdb">The quit database.</param>
        private async Task ClearEarlyQuits(Cmd c, DbQuits qdb)
        {
            qdb.DeleteUserFromDb(Helpers.GetArgVal(c, 3));

            StatusMessage = string.Format("^5[EARLYQUIT]^7 Cleared all early quit records for: ^3{0}",
                                          Helpers.GetArgVal(c, 3));
            await SendServerSay(c, StatusMessage);

            // See if there is an early quit-related ban and remove it as well
            await qdb.RemoveQuitRelatedBan(_sst, Helpers.GetArgVal(c, 3));

            // UI: reflect changes
            _sst.UserInterface.RefreshCurrentQuittersDataSource();
            _sst.UserInterface.RefreshCurrentBansDataSource();
        }