Add artificial delay if spam is detected or the captcha is wrong.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
7e6e47b191
commit
9b06a48f64
|
@ -28,11 +28,13 @@
|
|||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
using std::cerr;
|
||||
using std::cout;
|
||||
using std::exception;
|
||||
using std::getenv;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
using namespace FediBlock;
|
||||
|
||||
|
@ -82,11 +84,13 @@ int main()
|
|||
catch (const SpamException &e)
|
||||
{
|
||||
cerr << e.what() << '\n';
|
||||
std::this_thread::sleep_for(10s);
|
||||
cout << e.what() << "\r\n";
|
||||
}
|
||||
catch (const CaptchaException &e)
|
||||
{
|
||||
cerr << e.what() << '\n';
|
||||
std::this_thread::sleep_for(5s);
|
||||
cout << e.what() << "\r\n"
|
||||
<< "Use the back button of your browser to try again.\r\n";
|
||||
}
|
||||
|
|
Reference in New Issue