Add revspace specific plugins

Written by several authors. There is no log...
This commit is contained in:
Juerd Waalboer 2019-09-23 21:12:03 +02:00
parent b6855df288
commit 9797e3c1c8
8 changed files with 210 additions and 1 deletions

15
plugins/revspace_git Normal file
View file

@ -0,0 +1,15 @@
#!perl
sub command { NEXT }
sub hook_user_balance {
my ($class, $username, $old, $delta, $new, $transaction_id) = @_;
my $msg = "$transaction_id ($username)";
$msg =~ s/[^\x20-\x7E]//g;
$msg =~ s/'//g;
system("(git commit -am '$msg') > /dev/null 2>&1")
== 0 or warn "Meh, gitfaal";
system("git gc --auto");
}