3
* This file implements the UI controller for the antispam management
5
* @author {@link http://wonderwinds.com/ Ed Bennett}
6
* @copyright (c) 2013 by {@link http://quamplures.net/ the Quam Plures project}
7
* @license http://www.gnu.org/licenses/gpl.txt GNU General Public License v3
10
if(!defined('QP_MAIN_INIT')) die('fail');
12
echo '<h2>'.T_('Distributed Antispam').'</h2>';
14
// get out if this user is not in the admin group
15
if( ! $current_User->group_ID == 1 )
20
// get out if this user is not allowed to edit the blacklist
21
if( ! $current_User->check_perm( 'spamblacklist', 'edit' ) )
26
// inbound params tell us if we are being invited
27
$cell_baseurl = param( 'cell_baseurl', 'string', '' );
28
$cell_user_id = param( 'cell_user_id', 'integer', '' );
29
$cell_email = param( 'cell_email', 'string', '' );
30
$cell_name = param( 'cell_name', 'string', '' );
31
$cell_msg = param( 'cell_msg', 'string', '' );
32
$cell_nonce = param( 'cell_nonce', 'string', '' );
35
<p>This page becomes a form that gets sent to another Quam Plures installation via a file that
36
doesn't exist yet. Something like /qp_srvc/cell_join.php I guess. Kinda like how message form
37
works only it doesn't go to an email addy. Probably should be XMLRPC stuff but whatever. An
38
invite to join a cell sends a bunch of info:
41
the sender's email addy
42
the sender's preferred name
47
<p>Ah okay this is actually a pinger! So someone sends a ping to request joining a cell with
48
the above info bits. The recipient gets notified of a request to join IF they still have room
49
in their cell. Each installation has room for 4 but the installation is always the first. So
50
3 more can join the cell. If the recipient's cell is full then it automatically sends back a
51
"sorry no deal" message. If not full and the admin decides to not play with that person then
52
they send the same message: "sorry no deal".</p>
54
<p>If the recipient wants this new domain in their cell then they send back a "yes" with the info
55
they recieved as a serialized array, and a new nonce. A spot in the recipient's cell is now
56
reserved for some period of time. The initial sender must still have room is the thing. If
57
the sender still has room and gets the "yes" message then automagically another yes with the
58
second nonce is sent back. And yay a cell is born.</p>
60
<pre>SO: joiner sends info-with-nonce to target.
61
target is full? reject message returned.
62
target says no? reject message returned.
63
target says yes? accept message plus new nonce returned.
64
joiner still has room? cell established.
65
joiner filled up already? cancel request sent.</pre>
69
<p>This is a place-holder for a future option that will allow multiple Quam Plures installations to share information about blocked domains.</p>