Automatically Follow-on Flag SFR Approved FlagssteemCreated with Sketch.

in #utopian-io6 years ago

follow-on-flag.png

Repository

https://github.com/CodeBull/FollowOnFlag/

Follow Steem Flag Rewards (SFR) approved flags and automatically flag those abusive content. Follow-on flag is flagging abuse following another abuse fighter's lead. It is very effective in reducing or zeroing out abusive content's rewards.

How it works

The bot streams blockchain operations and looks for SFR approval comments. It looks for the approval category, finds the flagged author and permalink. Based on settings it flags right away or saves the data into the embedded database for flagging when Steem account's voting mana reaches 100%.

The user can set minimum pending payout left and maximum author SP before flagging.

At this moment it only works for flagging root posts.

fof-screenshot.png

The follow on flag comment is a reply to the @steemflagrewards comment

How to setup

To run the bot you need Node JS setup. If you do not know how to do that, please watch this tutorial on YouTube. After setting up Node JS, please follow the steps below.

Step 1

Clone the repository if you have Git installed. Open up the terminal and write the following command.

git clone https://github.com/CodeBull/FollowOnFlag.git

Here is an excellent video tutorial on how to install Git and how to clone a repository. You can also download the repository and extract on your server or computer.

Step 2

Open ecosystem.config.js file on a text editor and replace YOUR_STEEM_USERNAME with your Steem username and POSTING_WIF with your private posting key.

code-ss-2.png

Open config.js file and make changes according to your needs.

MAX_SP - Maximum amount of Steem Power of the abuser you want to flag. This should be a number. We don't want to commit suicide so we only tackle abusers with equal or less SP than us.

MIN_PAYOUT - Minimum pending payout in STU. This should be a number too.

FLAG_AT_100 - If set to false, the bot will flag right away. When it's set to true it will wait for 100% voting mana.

DOWNVOTE_WEIGHT - How much weight to use to downvote. Should be in float percentage and a negative number.

code-ss.png

Step 3

NPM is a package manager for Javascript. It is installed automatically when we installed Node JS. We will use it to install our required modules and project dependencies.

PM2 (http://pm2.io/) is a process manager for Node JS applications. It will allow us to keep the bot running. This ensures no downtime. There are other options available but I prefer PM2.

Install PM2 globally using NPM by running the following command on your terminal.

npm install -g pm2

We need to tell PM2 what application startup system we are using so that it can restart our bot when we reboot. Use the following command and follow instruction. Here is a video tutorial if you want to follow.

pm2 startup

Step 4

Install bot's dependencies using npm. Run the following command on the terminal and wait for it to finish.

npm install

Step 5

Start the bot using PM2 with the following command.

pm2 start ecosystem.config.js --env production

Now we need to tell PM2 to save our bot application so that it can restart when our server reboots.

pm2 save

We are done and our bot should be looking for SFR approval comments and abuse to flag.

Technologies

Contributing

Clone the repo and make the changes you wish to make. If you find any bugs, please create an issue.

These two features are needed for the bot:

  • Follow on flag for abusive comments
  • Setting mana parameters

GitHub Account

https://github.com/CodeBull

Disclaimer

Flagging is a risky business, there are often retaliations. Please flag responsibly. I cannot be held responsible for any harm caused by the use of this software.

Huge shout-out to @iamstan and @lovenfreedom who encouraged me to fight abuse and help me write this post. You two are awesome. :)

Rabbit and Red Flag clip art is used under appropriate free license.

Sort:  

Phenomenal work, @reazuliqbal. I see this as having great potential for others to set up auto follow-flags to support SFR which is a great thing.

My one recommendation is to use environmental variables instead of storing your WIF in the config file for security reasons. I think this article should help point you in the right direction in terms of implementation. To set the variable, you would issue the export command like so.

export WIF=<insert wif here>

I am really impressed by the clear instructions and seems pretty cut and dry. I know I have a bit of idle SP laying around somewhere so I may run through the process myself and let you know! Thanks!

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Hi @anthonyadavisii,

I did use environment variable, as you can see in the code on line #25.

ecosystem.config.js is a process configuration file for PM2. PM2 takes the STEEM_ACCOUNT, WIFand set them as environment variable. This file usually is not committed to a repository, I did it as an example so that a beginner user need not write it themselves. It can also be placed outside of the project directory.

I'd definitely look at the resource you've linked to.

Thank you so much for checking and reviewing my contribution. I highly appreciate it. :)

Thank you for your review, @anthonyadavisii! Keep up the good work!

Awesome tool.Thanks for sharing your work with the community. I am really excited to try this one out.
You are one of the serious guys about fighting abuse. I am very grateful that we have guys like you @steemflagrewards.

Keep up the good work, don't lose hope you have a beautiful bright future ahead of you.
I am also very glad I call you my friend.

I am trying to do my part and very glad that I have a helping friend like you. :)

It doesn't come with the built-in !rabbit interface?

Not yet. I reserved it for next update. 😉


Sourced from giphy.com

Hi @reazuliqbal!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hi @reazuliqbal, your post has been upvoted by @bdcommunity and the trail!

If you want to support us, please consider following our curation trail on Steemauto.com or delegating STEEM POWER to us.

20 SP50 SP100 SP200 SP300 SP500 SP1000 SP

JOIN US ON

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 2 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 6 SBD worth and should receive 182 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

Hey, @reazuliqbal!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

This is the shittest thing ever. And so post is flagged

I don't care what you think but you may have made a mistake.

Why dont you shove your care inside you ass

I'd choose where to do what. To know more you may have to wait a bit. :)

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.028
BTC 64275.79
ETH 3156.57
USDT 1.00
SBD 2.56