Update CustomReactionsService.cs

I'm a picky POS. :D
This commit is contained in:
xnaas 2017-06-16 13:19:29 -05:00 committed by GitHub
parent 8801a7451b
commit 270600198b

View File

@ -68,7 +68,7 @@ namespace NadekoBot.Services.CustomReactions
var hasTarget = cr.Response.ToLowerInvariant().Contains("%target%");
var trigger = cr.TriggerWithContext(umsg, _client).Trim().ToLowerInvariant();
return ((hasTarget && content.StartsWith(trigger + " ")) || (_bc.CustomReactionsStartWith && content.StartsWith(trigger)) || content == trigger);
return ((hasTarget && content.StartsWith(trigger + " ")) || (_bc.CustomReactionsStartWith && content.StartsWith(trigger + " ")) || content == trigger);
}).ToArray();
if (rs.Length != 0)
@ -89,7 +89,7 @@ namespace NadekoBot.Services.CustomReactions
return false;
var hasTarget = cr.Response.ToLowerInvariant().Contains("%target%");
var trigger = cr.TriggerWithContext(umsg, _client).Trim().ToLowerInvariant();
return ((hasTarget && content.StartsWith(trigger + " ")) || (_bc.CustomReactionsStartWith && content.StartsWith(trigger)) || content == trigger);
return ((hasTarget && content.StartsWith(trigger + " ")) || (_bc.CustomReactionsStartWith && content.StartsWith(trigger + " ")) || content == trigger);
}).ToArray();
if (grs.Length == 0)
return null;