Blame
Date:
Sun Dec 27 01:56:09 2020 UTC
Message:
Updated p5-Class-DBI-SQLite-0.11p2
01
2020-10-11
jrmu
#!/usr/bin/perl
02
2020-10-11
jrmu
03
2020-10-11
jrmu
package VPN;
04
2020-10-11
jrmu
05
2020-10-11
jrmu
use strict;
06
2020-10-11
jrmu
use warnings;
07
2020-10-11
jrmu
use OpenBSD::Pledge;
08
2020-10-11
jrmu
use OpenBSD::Unveil;
09
2020-10-11
jrmu
10
2020-10-11
jrmu
sub init {
11
2020-10-11
jrmu
}
12
2020-10-11
jrmu
# if ($reply =~ /^!vpn (.*) ([-_0-9a-zA-Z]+)$/i) {
13
2020-10-11
jrmu
# my $ircnick = $1;
14
2020-10-11
jrmu
# my $newnick = $2;
15
2020-10-11
jrmu
# if ($staff !~ /$sender/) {
16
2020-10-11
jrmu
# return;
17
2020-10-11
jrmu
# }
18
2020-10-11
jrmu
# my $password = newpass();
19
2020-10-11
jrmu
# createvpn($password, $newnick);
20
2020-10-11
jrmu
# sendmsg($bot, $sender, "vpn created for $newnick");
21
2020-10-11
jrmu
#my $msg = <<"EOF";
22
2020-10-11
jrmu
#Your vpn account has been created! Username: $newnick with password: $password
23
2020-10-11
jrmu
#Our official support channel is #vpn. To connect, please follow these instructions: https://ircnow.org/kb/doku.php?id=vpn:vpn .
24
2020-10-11
jrmu
#EOF
25
2020-10-11
jrmu
# sendmsg($bot, $ircnick, $msg);
26
2020-10-11
jrmu
# }
27
2020-10-11
jrmu
#sub createvpn {
28
2020-10-11
jrmu
# my ($password, $username) = @_;
29
2020-10-11
jrmu
# `doas sh -c 'echo "user '$username' '$password'" >> /etc/iked.conf'`;
30
2020-10-11
jrmu
# `doas rcctl reload iked`;
31
2020-10-11
jrmu
#}
32
2020-10-11
jrmu
33
2020-10-11
jrmu
1; # MUST BE LAST STATEMENT IN FILE