File: [local] / botnow / VPN.pm (download)
Revision 1.1.1.1 (vendor branch), Sat May 15 15:12:32 2021 UTC (3 years, 1 month ago) by bountyht
Branch: ircnow, MAIN
CVS Tags: start, HEAD Changes since 1.1: +0 -0 lines
Second import
|
#!/usr/bin/perl
package VPN;
use strict;
use warnings;
use OpenBSD::Pledge;
use OpenBSD::Unveil;
sub init {
}
# if ($reply =~ /^!vpn (.*) ([-_0-9a-zA-Z]+)$/i) {
# my $ircnick = $1;
# my $newnick = $2;
# if ($staff !~ /$sender/) {
# return;
# }
# my $password = newpass();
# createvpn($password, $newnick);
# sendmsg($bot, $sender, "vpn created for $newnick");
#my $msg = <<"EOF";
#Your vpn account has been created! Username: $newnick with password: $password
#Our official support channel is #vpn. To connect, please follow these instructions: https://ircnow.org/kb/doku.php?id=vpn:vpn .
#EOF
# sendmsg($bot, $ircnick, $msg);
# }
#sub createvpn {
# my ($password, $username) = @_;
# `doas sh -c 'echo "user '$username' '$password'" >> /etc/iked.conf'`;
# `doas rcctl reload iked`;
#}
1; # MUST BE LAST STATEMENT IN FILE