From 6d0fe62094232297bc0886997e5e4d1f06992ad9 Mon Sep 17 00:00:00 2001 From: appelemac Date: Wed, 15 Jun 2016 15:55:37 +0200 Subject: [PATCH] rip --- .vs/NadekoBot/NadekoBot.scgdat | Bin 131072 -> 0 bytes .../Modules/Conversations/Conversations.cs | 17 ++++------------- 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .vs/NadekoBot/NadekoBot.scgdat diff --git a/.vs/NadekoBot/NadekoBot.scgdat b/.vs/NadekoBot/NadekoBot.scgdat deleted file mode 100644 index e34ebe8d2ab64f089e47c182c8648a3a419a7573..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131072 zcmeI*TWlQF8Nl(gu9!e-`)jZIo7lCN0ih2&%E*0hZ9N$L;uo4$4-@!$u4I>IrGlytWwKlCM`ej ztk-+EL#Ir>EQvF!?S6k-K%=M(EhnzL7(WiU}$yzEhus%%l3hy^BF{&x7M$ZKb6(?j5~ZQk}zRG zf99go1)sen?87Pq5V$@BYWj%lqe9dI0R#|0009ILK;W7a_+aR7x3zSHP@X z_czX%&XT^y{h7XKs0YCtJD{m&}-bU@Dg4K<}yUMWjWD^*akU+?FRO$G=cfB*srAb9(Nsy|Sz~6CIuw!!5PiWLD>nDkW`q9?bPr5-L1x_b=)*+Ej)Tz;m z`bqsLtLyKY+>F;;Lc&M`zPZs1!lwI$`blaV?J{TgZ2hjNes`P;vWmZ4L9=o*N#2|e zlF!j5-NZ>7Qy2B0LtTkE8=adtdGkWPT_83B2q1s}0thUyK<^91$ulR;k4!(UhAteL zdaC#9_E#@F-hF8L;J|_Y{TFxl7tinPzi+Cqf7`&;{>{aW7d8~T`&XY|`EHjg6c!h= z{c^7V>b@Thx6AeacCRieZ`#?S>+`M7zvVB9yzSFpj z{_%jFx0lP;+-t|fhaY=k{E;Kytdu6kRsUGkozeN~koLOb%uH4V5#&_6&AkPo-oqQ( z!tMU5aB6qhi&bAkagT z$I7+AW@dK%OW#+)8%!6{Uz~gDJx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KjZGd&JFJDZFdjeb5GyUjxD8fd2q}2q3wfP?zyv4+0s`Y z94eJ6_m(T$`>v9jQ49nSKmY**5I_I{1Q0*~0R#|;2*{=Wzpj7%rGlLQ|H|8t)#v|8 ze#xLe1^6tu*}XkdEl&5I_I{1Q0*~ z0R#|00D)^;z(4=LwrfG@5kLR|1Q0*~0R#|0009ILKmY**5I_I{1Q0*~0R#|0009IL zKmY**5I_I{1Q0*~0R#|0009ILKmY**5I_I{1Q0*~0R#|0009ILKmY**5I_I{1Q0*~ z0R#|0009ILKmY**5I_I{1Q0*~0R#|0009ILKmY**5I_I{1Q0*~0R#|0009ILKmY** z5I_I{1Q0*~0R#|0009ILKmY**5I_I{1Q0*~0R#|0009ILKmY**5I_I{1Q0*~0R#|0 L009ILa0UJkXGugR diff --git a/NadekoBot/Modules/Conversations/Conversations.cs b/NadekoBot/Modules/Conversations/Conversations.cs index 64f28376..227814c7 100644 --- a/NadekoBot/Modules/Conversations/Conversations.cs +++ b/NadekoBot/Modules/Conversations/Conversations.cs @@ -1,16 +1,16 @@ using Discord; using Discord.Commands; using Discord.Modules; -using NadekoBot.Classes; using NadekoBot.Classes.Conversations.Commands; using NadekoBot.DataModels; using NadekoBot.Extensions; +using NadekoBot.Classes; +using System.Drawing.Drawing2D; using NadekoBot.Modules.Permissions.Classes; using NadekoBot.Properties; using System; using System.Diagnostics; using System.Drawing; -using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; using System.Linq; @@ -196,7 +196,7 @@ namespace NadekoBot.Modules.Conversations return; var usr = e.Channel.FindUsers(e.GetArg("user")).FirstOrDefault(); var text = ""; - var avatar = await GetAvatar(usr.AvatarUrl); + var avatar = await GetAvatar(usr.AvatarUrl); text = usr?.Name ?? e.GetArg("user"); var file = RipUser(text, avatar, string.IsNullOrWhiteSpace(e.GetArg("year")) ? null @@ -204,7 +204,6 @@ namespace NadekoBot.Modules.Conversations await e.Channel.SendFile("ripzor_m8.png", file); }); - if (!NadekoBot.Config.DontJoinServers) { cgb.CreateCommand("j") @@ -321,6 +320,7 @@ namespace NadekoBot.Modules.Conversations }); } + /// /// Create a RIP image of the given name and avatar, with an optional year /// @@ -332,16 +332,11 @@ namespace NadekoBot.Modules.Conversations { var bm = Resources.rip; var offset = name.Length * 2; - var fontSize = 20; - if (name.Length > 10) { fontSize -= (name.Length - 10) / 2; } - //var avatar = Image.FromStream(await SearchHelper.GetResponseStreamAsync(aviLink)); - - //TODO use measure string var g = Graphics.FromImage(bm); @@ -354,7 +349,6 @@ namespace NadekoBot.Modules.Conversations g.Dispose(); return bm.ToStream(ImageFormat.Png); - } @@ -375,9 +369,6 @@ namespace NadekoBot.Modules.Conversations return bmp; } - - - private static Func SayYes() => async e => await e.Channel.SendMessage("Yes. :)").ConfigureAwait(false); }