From e0ca8c575ecd71907a12d94a042e02eab5444eb3 Mon Sep 17 00:00:00 2001 From: Anna Date: Sat, 5 Sep 2020 15:39:09 -0400 Subject: [PATCH] fix(defs): prevent some RP false positives --- NoSoliciting.Tests/DefinitionsTests/Global.FreeCompany.cs | 2 ++ NoSoliciting.Tests/DefinitionsTests/Roleplay.cs | 8 ++++++++ NoSoliciting/definitions.yaml | 8 ++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/NoSoliciting.Tests/DefinitionsTests/Global.FreeCompany.cs b/NoSoliciting.Tests/DefinitionsTests/Global.FreeCompany.cs index 60475c1..a3a797c 100644 --- a/NoSoliciting.Tests/DefinitionsTests/Global.FreeCompany.cs +++ b/NoSoliciting.Tests/DefinitionsTests/Global.FreeCompany.cs @@ -21,10 +21,12 @@ namespace NoSoliciting.Tests.DefinitionsTests.Global { // party finder new TestMessage("FC recruiting new and experienced players. Interested? Join party, send me a /tell or stop by the FC house for more information. "), new TestMessage(@"Golden Crow [FC] offering new and old players a save place to hang and have fun with - join the weebs now \o/ /pm for info "), + new TestMessage("«ToC» recruiting active members. Join the party, send me a /Tell or stop by the FC house (Goblet P13, W19) for more information."), }); public static object[][] DataNegatives => DefUtils.DataFromMessages(new TestMessage[] { new TestMessage("Static recruit. Not hardcore. Discord needed. tues-thurs 11:30pmEST. Join if you have questions."), + new TestMessage("LF new LGBT friends to chill with in Eorzea! Join up, let's chat, and hang out. I have discord as well :)"), }); [Theory] diff --git a/NoSoliciting.Tests/DefinitionsTests/Roleplay.cs b/NoSoliciting.Tests/DefinitionsTests/Roleplay.cs index 492ac2f..a19f02e 100644 --- a/NoSoliciting.Tests/DefinitionsTests/Roleplay.cs +++ b/NoSoliciting.Tests/DefinitionsTests/Roleplay.cs @@ -23,8 +23,16 @@ namespace NoSoliciting.Tests.DefinitionsTests.Global { "Have a venue? Come plug yourself while checking us out! We're The - !! - https://discord.gg/S7BUVKh", }); + public static object[][] DataNegatives => DefUtils.DataFromStrings(new string[] { + "«ToC» recruiting active members. Join the party, send me a /Tell or stop by the FC house (Goblet P13, W19) for more information.", + }); + [Theory] [MemberData(nameof(DataPositives))] public void Positives(string msg) => this.Check(msg, CheckType.Positive); + + [Theory] + [MemberData(nameof(DataNegatives))] + public void Negatives(string msg) => this.Check(msg, CheckType.Negative); } } diff --git a/NoSoliciting/definitions.yaml b/NoSoliciting/definitions.yaml index 420e5c1..3043abd 100644 --- a/NoSoliciting/definitions.yaml +++ b/NoSoliciting/definitions.yaml @@ -48,7 +48,7 @@ # slower but more flexible, and they are specified by using a regex # key, as can be seen below. -version: 26 +version: 27 # This is the URL the plugin will POST reports to. report_url: https://nosol.annaclemens.io/report @@ -179,7 +179,6 @@ global: - music - contest - giveaway - - party - gambling - cosplay - bounty @@ -200,7 +199,7 @@ global: # mentions free company - - fc - free company - - regex: '<\w+>' + - regex: '[<«]\w+[>»]' # contains a call to action - - join - apply @@ -228,5 +227,6 @@ global: - veteran - seasoned - casual - - new - help + - regex: '\bold\b' + - regex: '\bvets?\b'