After some bloody battles the Kiwibot returns, now stronger than ever and with exciting new features.
Hello guys I want to give you an update on the situation around our lovely community bot. A few of you may know that this weekend has kind of been a rollercoaster ride for me: Our bot has been a victim of relentless spam and tag abuse and I had to take it offline for a few days top implement some changes and prevent further draining of Voting Power on the worst kind of trash.
Long story short, I'm very happy to tell you that the changes have been made and the Kiwibot is now back online!
First spam attack
If you do want to hear the story: On friday night I noticed some unusual voting activity in the server logs and decided to investigate. Welp, it turns out that it took spammers less than 72 hours of runtime to figure out that they could take advantage le sigh
To take immediate action I unvoted the rubbish and implemented a sloppy blacklist and went to sleep after running a quick test.
More abuse
Next morning the spam army was back....in numbers. I had blocked 4 people but now there were 10 more and now posting blatant spam just to abuse the bot:
I have no words for this.
But I do have a picture
I realized that the quick fix did not work: for every spammer I block, 3 more will appear. By now the VP was significantly drained by these assholes so I took the bot offline to make the updates and give it time to heal VP.
Whitelist
So unfortunately the update took me a bit longer than expected because I had a crazy busy weekend :O I decided to make a whitelist and allow only verified Teamnz members to use the bot. This means that spammers would be ignored completely (except for messing up our tag I guess).
It took me a while to gather all the names for the list, and I am just a human so I may have forgotten someone or misspelled a username...if you can't summon the bot and you should be able to, please come talk to me in Discord.
For the more techy amongst you: If you are interested on how the whitelist is written I found a very elegant way to do this(js) :
if(blacklist.indexOf(author) > -1){
console.log(author, ': This User is blacklisted.');
postWarning(ACCOUNT_NAME,ACCOUNT_KEY,author,link);
}
else if(whitelist.indexOf(author) > -1){
console.log('Tag found in: ',link, ' by: ', author);
postComment(ACCOUNT_NAME,ACCOUNT_KEY,author,link);
sendVote(ACCOUNT_KEY, ACCOUNT_NAME, author, link, 10000);
}
Where indexOf checks the author property of the blog post against an array of whitelisted and blacklisted names.
Yeah, take that spammers!
Bugs & Patches
So far the bot had a hard time dealing with 'post updates' since they are broadcasted on the STEEM blockchain with the tamnz tag, the bot would pick the post up again and comment after every post edit. It looks a bit funny when he comments 4 times on the same blog. (Get it right the first time people! JK)
So I believe I have fixed this now.
If you are interested in how this works: getContentReplies call allows me to pull the comments on a post:
Then I loop through the array and set a variable if already commented, to skip this post.
steem.api.getContentReplies(author, link, function(err, result) {
console.log(err, result);
console.log('Array length: ', result.length);
check = 1;
if(result.length>0){
for(i=0;i<result.length;i++){
if(result[i].author==ACCOUNT_NAME){
check = 0;
}
}
}
});
New features
The most attentive of you may have noticed that the bot did vote on a few posts even during the weekend downtime? What?
This is becase it was voting from steemauto on the posts written by it's delegators. I implemented this because I think that the delegators deserve to get something back for their community support, regardless or the which tags they use. Consider it a "premium" feature that delegatoers get 100% uptime even during patches :P
At this point a big thank you to ,
and
for delegating to the bot. Also a big thanks to
and
for following the curation trail. You guys are awesome!
You can help support TeamNZ!
You can delegate some SP and give the Kiwi community some love.
The easiest way to do this is to construct a URL with Steemconnect and then paste it into your browser! This is the correct format:
https://steemconnect.com/sign/delegateVestingShares?delegator=YOURUSERNAME&delegatee=BOTUSERNAME&vesting_shares=AMOUNT%20SP
Change the USENAMES and SP Values! Here is an example of how I would do this:
https://steemconnect.com/sign/delegateVestingShares?delegator=cryptonik&delegatee=teamnz&vesting_shares=20%20SP
You can also follow the curation trail instead of delegating
Following a curation trail means that you will follow the bot and copy his votes. Every time he votes, you will vote too.
We have setup a curation trail on Steemauto. On steemauto you can also set the percentage of your vote weight, and set the limit on how far your voting power can be depleted.
Make an account on https://steemauto.com and follow @teamnz!
Here is the direct link: https://steemauto.com/dash.php?i=1&trail=teamnz
I hope we can get some more support and spread some love among the Kiwis on Steemit :)
Join Us on Discord
If you haven't already, please come and join us on the South Pacific (AUS/NZ) Community server