From e9192b3d42660a5781101df4357d276318151e8a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Aug 2013 17:14:41 -0500 Subject: cgi-bin & lib --- cgi-bin/bless | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 cgi-bin/bless (limited to 'cgi-bin/bless') diff --git a/cgi-bin/bless b/cgi-bin/bless new file mode 100755 index 0000000..0773fe7 --- /dev/null +++ b/cgi-bin/bless @@ -0,0 +1,23 @@ +#!/usr/bin/perl +######################################### +# bless +######################################### + +use localbucky; + +$dbh = DBI->connect ($dsn); + +our ($USER, $lastlog) = checkin(); +logout() unless ($USER != -1); + +our $blessy = $input->{username}; +if (get_uid($blessy) == -1) + { error("no such user $blessy"); } +elsif ($blessy eq $USER->{username}) + { error("you fucking egomaniac"); } +commit_blessing($blessy); +new_message("$blessy.inbox", {sender => "$USER->{username}", recipient => "$blessy", unread => 1, subject => "You look radiant.", body => "You feel a slight prickling along your nape."}); +redirect("$BUCKY/index"); + +$dbh->disconnect (); + -- cgit v1.2.3-70-g09d2