diff --git a/src/NadekoBot/Modules/Administration/Services/LogCommandService.cs b/src/NadekoBot/Modules/Administration/Services/LogCommandService.cs index b185fff7..37b2781e 100644 --- a/src/NadekoBot/Modules/Administration/Services/LogCommandService.cs +++ b/src/NadekoBot/Modules/Administration/Services/LogCommandService.cs @@ -12,9 +12,11 @@ using NadekoBot.Services; using NadekoBot.Services.Database.Models; using NadekoBot.Services.Impl; using NLog; +using NadekoBot.Common; namespace NadekoBot.Modules.Administration.Services { + [NoPublicBot] public class LogCommandService : INService { diff --git a/src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs b/src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs index dd489bf0..1fd1cbcc 100644 --- a/src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs +++ b/src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs @@ -22,7 +22,7 @@ namespace NadekoBot.Modules.Games.Common.Nunchi public Phase CurrentPhase { get; private set; } = Phase.Joining; public event Func OnGameStarted; - public event Func OnRoundStarted; + public event Func OnRoundStarted; public event Func OnUserGuessed; public event Func OnRoundEnded; // tuple of the user who failed public event Func OnGameEnded; // name of the user who won @@ -87,7 +87,7 @@ namespace NadekoBot.Modules.Games.Common.Nunchi CurrentPhase = Phase.Playing; var _ = OnGameStarted?.Invoke(this); - var __ = OnRoundStarted?.Invoke(this); + var __ = OnRoundStarted?.Invoke(this, CurrentNumber); return true; } finally { _locker.Release(); } @@ -164,7 +164,7 @@ namespace NadekoBot.Modules.Games.Common.Nunchi { await Task.Delay(_nextRoundTimeout).ConfigureAwait(false); CurrentPhase = Phase.Playing; - var ___ = OnRoundStarted?.Invoke(this); + var ___ = OnRoundStarted?.Invoke(this, CurrentNumber); }); } diff --git a/src/NadekoBot/Modules/Games/NunchiCommands.cs b/src/NadekoBot/Modules/Games/NunchiCommands.cs index e5b3af96..834e2c02 100644 --- a/src/NadekoBot/Modules/Games/NunchiCommands.cs +++ b/src/NadekoBot/Modules/Games/NunchiCommands.cs @@ -5,9 +5,7 @@ using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Nunchi; using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Games @@ -100,9 +98,11 @@ namespace NadekoBot.Modules.Games } } - private Task Nunchi_OnRoundStarted(Nunchi arg) + private Task Nunchi_OnRoundStarted(Nunchi arg, int cur) { - return ConfirmLocalized("nunchi_round_started", Format.Bold(arg.CurrentNumber.ToString())); + return ConfirmLocalized("nunchi_round_started", + Format.Bold(arg.ParticipantCount.ToString()), + Format.Bold(cur.ToString())); } private Task Nunchi_OnUserGuessed(Nunchi arg) diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index eb82d0ce..2d31c6fc 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -20,7 +20,7 @@ namespace NadekoBot.Services.Impl private readonly IBotCredentials _creds; private readonly DateTime _started; - public const string BotVersion = "1.6"; + public const string BotVersion = "1.6.1"; public string Author => "Kwoth#2560"; public string Library => "Discord.Net"; diff --git a/src/NadekoBot/Services/ServiceProvider.cs b/src/NadekoBot/Services/ServiceProvider.cs index 32a8419d..6efe0a2b 100644 --- a/src/NadekoBot/Services/ServiceProvider.cs +++ b/src/NadekoBot/Services/ServiceProvider.cs @@ -7,6 +7,10 @@ using System.Reflection; using System.Linq; using System.Diagnostics; using NLog; +#if GLOBAL_NADEKO +using NadekoBot.Common; +#endif + namespace NadekoBot.Services { @@ -42,11 +46,18 @@ namespace NadekoBot.Services { var allTypes = assembly.GetTypes(); var services = new Queue(allTypes - .Where(x => x.GetInterfaces().Contains(typeof(INService)) && !x.GetTypeInfo().IsInterface && !x.GetTypeInfo().IsAbstract) + .Where(x => x.GetInterfaces().Contains(typeof(INService)) + && !x.GetTypeInfo().IsInterface && !x.GetTypeInfo().IsAbstract + +#if GLOBAL_NADEKO + && x.GetTypeInfo().GetCustomAttribute() == null +#endif + ) .ToArray()); var interfaces = new HashSet(allTypes - .Where(x => x.GetInterfaces().Contains(typeof(INService)) && x.GetTypeInfo().IsInterface)); + .Where(x => x.GetInterfaces().Contains(typeof(INService)) + && x.GetTypeInfo().IsInterface)); var alreadyFailed = new Dictionary(); diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index 8928ba6c..5eb34cd7 100644 --- a/src/NadekoBot/_strings/ResponseStrings.en-US.json +++ b/src/NadekoBot/_strings/ResponseStrings.en-US.json @@ -374,7 +374,7 @@ "games_nunchi_started": "Nunchi game started with {0} participants.", "games_nunchi_round_ended": "Nunchi round ended. {0} is out of the game.", "games_nunchi_round_ended_boot": "Nunchi round ended due to timeout of some users. These users are still in the game: {0}", - "games_nunchi_round_started": "Nunchi round started. Start counting from the number {0}.", + "games_nunchi_round_started": "Nunchi round started with {0} users. Start counting from the number {0}.", "games_nunchi_next_number": "Number registered. Last number was {0}.", "games_nunchi_failed_to_start": "Nunchi failed to start because there were not enough participants.", "games_nunchi_created": "Nunchi game created. Waiting for users to join.",