unless ($cfg) {
$cfg = Config::Any->load_stems({stems => [$ENV{RGCONFIG} // '/etc/rg'], use_ext => 1, flatten_to_hash => 1});
my @cfg = values %$cfg;
unless ($cfg) {
$cfg = Config::Any->load_stems({stems => [$ENV{RGCONFIG} // '/etc/rg'], use_ext => 1, flatten_to_hash => 1});
my @cfg = values %$cfg;
sub sendsms {
my ($number, $text) = @_;
my ($fh, $file) = tempfile 'smsXXXX', TMPDIR => 1;
sub sendsms {
my ($number, $text) = @_;
my ($fh, $file) = tempfile 'smsXXXX', TMPDIR => 1;
sub action {
my ($number, $date, $text) = @_;
my $password = cfg 'password';
sub action {
my ($number, $date, $text) = @_;
my $password = cfg 'password';
my $password = $r->param('password');
return [403, ['Content-Type', 'text/plain'], ['Bad password']] unless $password eq $correct_password;
my $text = $r->param('text');
my $password = $r->param('password');
return [403, ['Content-Type', 'text/plain'], ['Bad password']] unless $password eq $correct_password;
my $text = $r->param('text');