From c5c9e98b516a6ef4aa51999e306be429e803aa9c Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 20 Jul 2016 22:41:02 +0200 Subject: [PATCH 1/3] fix #429 --- NadekoBot/Modules/Searches/SearchesModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NadekoBot/Modules/Searches/SearchesModule.cs b/NadekoBot/Modules/Searches/SearchesModule.cs index 15c1c9be..1a2ed20b 100644 --- a/NadekoBot/Modules/Searches/SearchesModule.cs +++ b/NadekoBot/Modules/Searches/SearchesModule.cs @@ -226,10 +226,10 @@ $@"🌍 **Weather for** 【{obj["target"]}】 .Parameter("terms", ParameterType.Unparsed) .Do(async e => { - var terms = e.GetArg("terms")?.Trim().Replace(' ', '+'); + var terms = e.GetArg("terms")?.Trim(); if (string.IsNullOrWhiteSpace(terms)) return; - await e.Channel.SendMessage($"https://google.com/search?q={ HttpUtility.UrlEncode(terms) }") + await e.Channel.SendMessage($"https://google.com/search?q={ HttpUtility.UrlEncode(terms).Replace(' ', '+') }") .ConfigureAwait(false); }); From 2e6bdc9f08d1af46cd5b4cc788b2405cab89a0df Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 20 Jul 2016 22:51:41 +0200 Subject: [PATCH 2/3] woops, fixed #426 , no longer saying queue full when its not --- NadekoBot/Modules/Music/Classes/MusicControls.cs | 2 -- NadekoBot/Modules/Music/MusicModule.cs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/NadekoBot/Modules/Music/Classes/MusicControls.cs b/NadekoBot/Modules/Music/Classes/MusicControls.cs index 41e8c7c1..146ca5ea 100644 --- a/NadekoBot/Modules/Music/Classes/MusicControls.cs +++ b/NadekoBot/Modules/Music/Classes/MusicControls.cs @@ -27,8 +27,6 @@ namespace NadekoBot.Modules.Music.Classes public class MusicPlayer { - public static int MaximumPlaylistSize => 50; - private IAudioClient audioClient { get; set; } private readonly List playlist = new List(); diff --git a/NadekoBot/Modules/Music/MusicModule.cs b/NadekoBot/Modules/Music/MusicModule.cs index c9900e7c..18b8966c 100644 --- a/NadekoBot/Modules/Music/MusicModule.cs +++ b/NadekoBot/Modules/Music/MusicModule.cs @@ -151,7 +151,7 @@ namespace NadekoBot.Modules.Music else if (musicPlayer.RepeatPlaylist) toSend += "🔁"; toSend += $" **{musicPlayer.Playlist.Count}** `tracks currently queued. Showing page {page}` "; - if (musicPlayer.Playlist.Count >= MusicPlayer.MaximumPlaylistSize) + if (musicPlayer.Playlist.Count >= musicPlayer.MaxQueueSize) toSend += "**Song queue is full!**\n"; else toSend += "\n"; From ae6deee1db4c6fefaf196b6e77cda8266b6b7cd0 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 20 Jul 2016 22:58:41 +0200 Subject: [PATCH 3/3] ace is the strongest high card #423 --- NadekoBot/Modules/Gambling/Helpers/Cards.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NadekoBot/Modules/Gambling/Helpers/Cards.cs b/NadekoBot/Modules/Gambling/Helpers/Cards.cs index 76dc73a5..1cd4ba95 100644 --- a/NadekoBot/Modules/Gambling/Helpers/Cards.cs +++ b/NadekoBot/Modules/Gambling/Helpers/Cards.cs @@ -226,7 +226,7 @@ namespace NadekoBot.Modules.Gambling.Helpers { return kvp.Key; } - return "High card " + cards.Max().GetName(); + return "High card " + (cards.FirstOrDefault(c => c.Number == 1)?.GetName() ?? cards.Max().GetName()); } } }