mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-25 22:45:32 +00:00
26 lines
447 B
C++
26 lines
447 B
C++
#include <cstdlib>
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <map>
|
|
|
|
#include "filter_evaluator.h"
|
|
#include "request.h"
|
|
|
|
int main( int argc, char** argv ) {
|
|
request r;
|
|
string result;
|
|
|
|
try {
|
|
if (!r.load(std::cin))
|
|
return 1;
|
|
|
|
result = r.evaluate();
|
|
} catch (AFPException excep) {
|
|
cout << "EXCEPTION: " << excep.what() << endl;
|
|
cerr << "EXCEPTION: " << excep.what() << endl;
|
|
}
|
|
|
|
cout << result << "\0";
|
|
}
|