[TAC] Stop Country Spam

[TAC] Stop Country Spam [Paid] 3.1.5

No permission to buy ($19.00)
Hi Yugensoft,

Thankd for replying in this thread and NOT the one i reposted the issue in yesterday for XF2 here : https://xenforo.com/community/threads/tac-stop-country-spam-paid.147710/#post-1265206

However your Notice on GeoIP change does not work. I get the message.....

@
{"message":"You have either exeeded your quota or have not provided an API key. Get a free API Key at https://ipdata.co/registration.html or contact support@ipdata.co to upgrade or register for a paid plan at https://ipdata.co/pricing.html."}"

There is nowhere in the App to be able to add an API key... therefore still stuck...
 
@Paul yes if your site is large & makes a lot of requests, it's hard to find a GeoIP service that's continuously free/open and not needing an api key. They seem to drop out of existence or go behind an account wall as soon as they get popular.
For ipdata.co, https://ipdata.co/docs.html, it appears you set it up by appending ?api-key={your-api-key} to the API URL. So the setting is likely: https://api.ipdata.co/{$ip}/?api-key={your-api-key}

Another option seems to be ipstack, which has a 10k/month free limit: https://ipstack.com/product
https://xenforo.com/community/threads/tac-stop-country-spam-paid.147710/post-1265441

You can also reduce requests (at the cost of registration page load speed) by turning off the pre-cache option.
 
Last edited:
Info: Whereas freegeoip.net is closed since July 1, freegeoip.app will continue to serve requests for free at the same conditions, but with SSL.

So you can simply change http://freegeoip.net/json/{ip} to https://freegeoip.app/json/{ip} in your request URL settings and everything will continue working.
 
Your addon is preventing users from registering on my site....

After installing it:
XF\Db\Exception: MySQL statement prepare error [1146]: Table 'theaocdu_xenforo.xf_tac_scs_cache' doesn't exist src/XF/Db/AbstractStatement.php:212
Generated by: Unknown account 6 August 2018 at 13:36
Stack trace
SELECT `xf_tac_scs_cache`.*
FROM `xf_tac_scs_cache`

WHERE (`xf_tac_scs_cache`.`ip` = '2001:bb6:561d:e58:8d07:fabe:ca68:9e41')


LIMIT 1
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1130): XF\Db\AbstractAdapter->query('\n\t\t\tSELECT `xf_...')
#5 src/addons/Yugensoft/TacStopCountrySpam/Entity/GeoIpCache.php(32): XF\Mvc\Entity\Finder->fetchOne()
#6 src/addons/Yugensoft/TacStopCountrySpam/XF/Service/User/Registration.php(39): Yugensoft\TacStopCountrySpam\Entity\GeoIpCache::getCache('2001:bb6:561d:e...')
#7 src/addons/Yugensoft/TacStopCountrySpam/XF/Service/User/Registration.php(23): Yugensoft\TacStopCountrySpam\XF\Service\User\Registration->checkForBlockedCountry(Array)
#8 src/XF/Pub/Controller/Register.php(386): Yugensoft\TacStopCountrySpam\XF\Service\User\Registration->checkForSpam()
#9 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Register), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}
Request state
array(4) {
["url"] => string(18) "/register/register"
["referrer"] => string(30) "https://www.theaocdungeon.com/"
["_GET"] => array(0) {
}
["_POST"] => array(13) {
["username"] => string(0) ""
["68acae24434538a514e759eebea03e368e3019d9"] => string(7) "**********"
["0668c9dd2189abec83508afb36936cb534b25521"] => string(0) ""
["794b147d4a372d314ee8658d0b0f9d306becdceb"] => string(23) "**************"
["b06876fd399a565f0a33eea0485bf80c6c24c1b5"] => string(8) "********"
["g-recaptcha-response"] => string(377) "03AEMEkElK-vx6lHiQLokHjxjzcNskXNYvFfyg8J61neIfbVUV7ugFndrGhyQRFN_I7y6Ik-z31nQgQyF8eNA8RsrXWiDRMCo7Fcu9ihn4LM7t-3O6GZqHosMoFjUENllb01sbmQX-fMwz_fvHvWWuYnKFxMqtd94A2Pxq-In0oA4k3kXE2sCPx2m3iLBCJkUTnhmh7q-TecHUWqFLZr2uZm_ju_IpMVA-FDb3W2oFQQiDmuZBbGFKSnv3BxWOzW_orwwQ-Wmx6E2asAdxUgYgVV-eKUyT97RqTeEJhcbPZzJyVSnOoEGHfyfE0Ln7Jt_pKb9i5583-UaR80qXGHCEO5cduH9cWPj6n5nIo5c0_GgpVIw31eJNRLM"
["accept"] => string(1) "1"
["reg_key"] => string(16) "yz-iaHROp2QV7hNR"
["da4c1c6b9918f8d3724a6d9420cb5ca5fc5b1b6e"] => string(13) "Europe/London"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(1) "/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
 
Your addon is preventing users from registering on my site....
Same error on the XF2 version, same outcome, blocking registration. It is the Cache GeoIP data option. Uncheck that, it allows registration... but the XF2 version does not block any countries at all, reject or moderation.
 
Last edited:
Suddenly I have had a slew of spammers from Pakistan, I have the add on stop human spam, will this stop country spam help me here?
 
This resource has been removed and is no longer available. The following reason was provided:
This resource has been deleted by XenForo Ltd. in line with our resource housekeeping criteria.
 
If I put my country into the list and try to register, it does nothing to stop me.

I get this error: Undefined index: country_code

This is using: https://api.ipdata.co/{$ip}

This API is not freely accessible. You need an API key to access it's data. This API key needs to be included into the access url. Otherwise you won't get any results back (creates the error message you see).

Like so:
https://api.ipdata.co/{$ip}?api-key=test

I would recommend to use a free geo api instead.

Also: For quickest possible answers to support questions please use the support ticket system at our site. Thank you!
 
Top Bottom