Gun store Shooting Locations It is currently Thu Mar 28, 2024 3:14 pm



Rules WGO Chat Room Gear Rent Me Shield NRA SAF CCKRBA
Calendar




Reply to topic  [ 10 posts ] 
 Run a script on new ads that prompts for "WTS"? 
Author Message
Site Supporter
User avatar
Site Supporter

Location: Duvall
Joined: Thu Mar 17, 2011
Posts: 4599
Real Name: David
Nearly every day, several times a day, Steve has to go police the want to sell ads to prompt the sellers to change the title of their ad to include "WTS", or "WTT", or whatever to abide by the rules. I'm sure he enjoys this immensely.

It would seem like it would be easy to write a RegEx that tests each new add title looking for the variants of WTS / WTT, etc. and automatically send a PM to the offending ad writer, and / or auto respond in the thread so Steve doesn't have to do it all day every day.

So as an example using this simple regex: ^WTS|WTT|WTB|FT|FS
You would get a fail on the first two ad titles and a success on the last three on these I've pulled randomly from today

357 Black Talon
Poor mans bullet feeder 9mm. Hornady
WTS Once Fired 7.65x53 Rifle Brass
FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.
WTB: HK P30 LEM NO SAFETY

So pseudocode would go like this:

Code:
//declare a new regex for the strings you want to have in the ad
string re = new Regex("^WTS|WTT|WTB|FT|FS");
//check an array of new ads over the past hour or whatever:
string[] NewAdTitles = {
    "357 Black Talon",
    "Poor mans bullet feeder 9mm. Hornady",
    "WTS Once Fired 7.65x53 Rifle Brass",
    "FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.",
    "WTB: HK P30 LEM NO SAFETY" };
//look for a non-match in the ad title, if the required substrings aren't found somewhere in the string, send reminders to offending authors
foreach(string s in NewAdTitles)
{    if(!re.match(s)
    {
        sendMailToRemindAuthorToFollowRules(s.author);
        autoRespondInAdSoSteveDoesntHaveTo(s)
    }
}

_________________
David
Unique Treen
Image


Wed Aug 26, 2020 2:22 pm
Profile WWW
Site Admin
User avatar
Site Admin

Location: Olympia, WA
Joined: Fri Mar 11, 2011
Posts: 38291
Real Name: Dan
The new software, when we get around to it, will have strict rules built into the classifieds that require a suffix.


Wed Aug 26, 2020 5:43 pm
Profile WWW
Site Supporter
User avatar
Site Supporter

Location: RENTON
Joined: Fri Mar 25, 2011
Posts: 20748
Real Name: John
All the WTS ad's that are wrong and need policing give Steve meaning.
He loves that shit.
Oh, and don't bump your ad early or make any chit chat either. He is on that shit like a Pitbull on a Pork Chop.
You won't even have time to edit once you hit "submit" before the PM comes. :peep:

_________________
Mr. Q wrote: so basically, if you have to smoke some asshole, make sure they become fertilizer and then Bounce? got it.

Guntrader wrote: Huh, maybe I was an asshole.

NRA Member/RSO
SAF 5 Year Donor
GOA Member


Wed Aug 26, 2020 6:10 pm
Profile
Site Admin
User avatar
Site Admin

Location: Olympia, WA
Joined: Fri Mar 11, 2011
Posts: 38291
Real Name: Dan
Steve really only has one purpose in life, and that's to police us.


Wed Aug 26, 2020 6:19 pm
Profile WWW
Site Admin
User avatar
Site Admin

Location: Renton, WA
Joined: Sun Mar 13, 2011
Posts: 51917
Real Name: Steve
Massivedesign wrote:
The new software, when we get around to it....


Image

Oh, I'm ready to give my one purpose, any time . . . I wouldn't miss it for a second.

_________________
Steve

Benefactor Life Member, National Rifle Association
Life Member, Second Amendment Foundation
Patriot & Life Member, Gun Owners of America
Life Member, Citizens Committee for the Right to Keep and Bear Arms
Legal Action Supporter, Firearms Policy Coalition
Member, NAGR/NFGR

Please support the organizations that support all of us.

Leave it cleaner than you found it.


Wed Aug 26, 2020 8:39 pm
Profile
Site Moderator
User avatar
Site Moderator

Location: Marysville
Joined: Thu Mar 22, 2012
Posts: 13477
Real Name: Mike
usrifle wrote:
All the WTS ad's that are wrong and need policing give Steve meaning.
He loves that shit.
Oh, and don't bump your ad early or make any chit chat either. He is on that shit like a Pitbull on a Pork Chop conspiracy theory.
You won't even have time to edit once you hit "submit" before the PM comes. :peep:

Early bumps are my domain dammit! :bitchfight:

_________________
Licensed/Bonded/Insured Hardwood Floor Installer/Finisher http://www.hardwoodfloorsnw.com/


Wed Aug 26, 2020 10:30 pm
Profile
Site Supporter
User avatar
Site Supporter

Location: RENTON
Joined: Fri Mar 25, 2011
Posts: 20748
Real Name: John
Sinus211 wrote:
usrifle wrote:
All the WTS ad's that are wrong and need policing give Steve meaning.
He loves that shit.
Oh, and don't bump your ad early or make any chit chat either. He is on that shit like a Pitbull on a Pork Chop conspiracy theory.
You won't even have time to edit once you hit "submit" before the PM comes. :peep:

Early bumps are my domain dammit! :bitchfight:


Not with Steve "Working" from home. :wink05:

_________________
Mr. Q wrote: so basically, if you have to smoke some asshole, make sure they become fertilizer and then Bounce? got it.

Guntrader wrote: Huh, maybe I was an asshole.

NRA Member/RSO
SAF 5 Year Donor
GOA Member


Wed Aug 26, 2020 11:25 pm
Profile
Site Admin
User avatar
Site Admin

Location: Olympia, WA
Joined: Fri Mar 11, 2011
Posts: 38291
Real Name: Dan
I think Steve leaves us nuggets, so we feel like we are a part of the team too. Or, he's testing us.


Thu Aug 27, 2020 5:36 am
Profile WWW
Site Supporter
User avatar
Site Supporter

Location: Burlington
Joined: Wed Aug 22, 2012
Posts: 5999
Real Name: Kyle
Bump

_________________
Looking for:
S&W Schofield 2x (.38/357)
Coonan 1911
Nemo Omen
JM Marlin 39M
Tikka T3 Tactical(.308)
BAR(.308)


Thu Aug 27, 2020 6:53 am
Profile
Site Supporter
User avatar
Site Supporter

Location: Index
Joined: Thu Aug 23, 2012
Posts: 12963
Real Name: Jeff
delliottg wrote:
Nearly every day, several times a day, Steve has to go police the want to sell ads to prompt the sellers to change the title of their ad to include "WTS", or "WTT", or whatever to abide by the rules. I'm sure he enjoys this immensely.

It would seem like it would be easy to write a RegEx that tests each new add title looking for the variants of WTS / WTT, etc. and automatically send a PM to the offending ad writer, and / or auto respond in the thread so Steve doesn't have to do it all day every day.

So as an example using this simple regex: ^WTS|WTT|WTB|FT|FS
You would get a fail on the first two ad titles and a success on the last three on these I've pulled randomly from today

357 Black Talon
Poor mans bullet feeder 9mm. Hornady
WTS Once Fired 7.65x53 Rifle Brass
FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.
WTB: HK P30 LEM NO SAFETY

So pseudocode would go like this:

Code:
//declare a new regex for the strings you want to have in the ad
string re = new Regex("^WTS|WTT|WTB|FT|FS");
//check an array of new ads over the past hour or whatever:
string[] NewAdTitles = {
    "357 Black Talon",
    "Poor mans bullet feeder 9mm. Hornady",
    "WTS Once Fired 7.65x53 Rifle Brass",
    "FS/FT: 7.62x45mm Czech ammo for VZ52 47 rounds total.",
    "WTB: HK P30 LEM NO SAFETY" };
//look for a non-match in the ad title, if the required substrings aren't found somewhere in the string, send reminders to offending authors
foreach(string s in NewAdTitles)
{    if(!re.match(s)
    {
        sendMailToRemindAuthorToFollowRules(s.author);
        autoRespondInAdSoSteveDoesntHaveTo(s)
    }
}

Dude!

You left out the part where it asks for credit card info, then sends me two bucks!

_________________
-Jeff

How can I help you, and/or make you smile, today?

You are entitled to your opinion. You are not entitled to tell me what mine must be.

Do justice. Love mercy.

“I would rather have questions that can't be answered than answers that can't be questioned.” ~ Richard P. Feynman


Thu Aug 27, 2020 9:20 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: Tank674 and 56 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum



Rules WGO Chat Room Gear Rent Me NRA SAF CCKRBA
Calendar


Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.
[ Time : 0.936s | 19 Queries | GZIP : Off ]