watch: add 'watch' support
[girocco/ztw.git] / cgi / watchspam.cgi
blobfb8de4ea9e5346223f723a4a2fd83b768ee83931
1 #!/usr/bin/perl
2 # (c) Zachary T Welch <zw@superlucidity.net>
3 # GPLv2
5 use strict;
6 use warnings;
8 use lib qw(/home/repo/repomgr/cgi);
9 use Git::RepoCGI;
11 my $repo = Git::RepoCGI->new('Report User');
12 my $project = $repo->sparam('project');
14 # check for submission
15 my $incomplete = grep { ! $repo->sparam($_) } qw( user name cpwd go );
16 $repo->bye('Not yet implemented') unless $incomplete;
18 print <<EOT
19 <p>
20 Using the form on this page, users watching '$project.git' can report
21 absusive messages sent to them by users using the 'contact' feature.
22 This allows projects and forks to track repeat or egregious offenders
23 and add their accounts to a blacklist automatically.
24 </p>
25 <p>
26 In addition, message will be sent to the site administrator and the
27 contact address listed for the project listed (if provided). This will
28 ensure the administrators can take prompt action when required.
29 </p>
31 <h3>Report Details</h3>
33 <form method="post">
34 <p>Project: <input type="text" name="project" value="$project" />
35 <sup>(optional)</sup></p>
36 <p>Account: <input type="text" name="user" /></p>
37 <h3>Reason for Report</h3>
38 <p>
39 Please provide some context and a description of the abuse for the
40 administrators, but the automated system often will work magic without
41 manual intervention. When it comes to just vengance, the power of the
42 mob works effectively and efficiently.
43 </p>
44 <textarea cols="80" rows="5">
45 </textarea>
46 </p>
48 <h3>Account Authentication</h3>
49 <p>Account: <input type="text" name="name" /></p>
50 <p>Password: <input type="password" name="cpwd" /></p>
51 <br />
52 <p><input type="submit" name="go" value="Report" /></p>
53 </form>
54 EOT