diff --git a/webv4/root/api/forum.ssjs b/webv4/root/api/forum.ssjs index 8835437a2f2c8e31803fd16448c6b9a0a387ffa6..2a660f299bc983bc99447c460fd7b7ed14e01e7e 100644 --- a/webv4/root/api/forum.ssjs +++ b/webv4/root/api/forum.ssjs @@ -12,9 +12,7 @@ load(settings.web_lib + 'forum.js'); var reply = {}; // There must be an API call, and the user must not be a guest or unknown -if ((http_request.method === 'GET' || http_request.method === 'POST') && - typeof http_request.query.call !== 'undefined' -) { +if (http_request.query.call !== undefined && (http_request.method === 'GET' || http_request.method === 'POST')) { var handled = false; @@ -152,6 +150,14 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') && } break; + case 'block-sender': + if (user.is_sysop) { + if (http_request.query.from) addTwit(decodeURIComponent(http_request.query.from[0])); + if (http_request.query.from_net) addTwit(decodeURIComponent(http_request.query.from_net[0])); + reply.err = null; + } + break; + default: handled = false; break;