This commit is contained in:
mynah
2019-03-03 20:22:21 -06:00
parent 2ce1749b9c
commit 1914552c20
26 changed files with 26 additions and 30 deletions

2
lib/Dojo.pm Normal file → Executable file
View File

@@ -8,7 +8,7 @@ use Dojo::Model::Users;
sub startup {
my $self = shift;
my $config = $self->plugin('Config'); #Config hash dojo.conf
$self->plugin('PODRenderer') if $config->{perldoc}; #doc
# $self->plugin('PODRenderer') if $config->{perldoc}; #doc
$self->secrets(['Mojojojo jojo']); #cookies
$self->helper(dbv => sub { state $dbv = Dojo::Model::Vuelo->new });

47
lib/Dojo/Conf.pm.example Normal file → Executable file
View File

@@ -3,42 +3,33 @@ use strict;
use warnings;
#Paths
use constant {
MOD => "public", #location of modules
SERVER_NAME => "localhost:3000",
CHAT_SRV => "chat.vuelodegrulla.com",
MOD => "public",
};
# database access
use constant {
VUELODB => "dbname",
VUELODB => "vuelo",
VUELODB_H => "localhost",
VUELODB_UW => "writtername",
VUELODB_UWP => "writterpass",
VUELODB_UR => "readername",
VUELODB_URP => "readerpass",
VUELODB_UW => "root",
VUELODB_UWP => "passwd",
VUELODB_UR => "root",
VUELODB_URP => "passwd",
GRULLADB_H => "localhost",
GRULLADB => "grulla",
GRULLADB_UR => "root",
GRULLADB_URP=> "passwd",
GRULLADB_UW => "root",
GRULLADB_UWP=> "passwd",
MSGDB => "mensaje",
MSGDB_H => "localhost",
MSGDB_UW => "root",
MSGDB_UWP => "passwd",
MSGDB_UR => "root",
MSGDB_URP => "passwd",
};
our $radio ={ #hash to configure icecast radio
server_name => SERVER_NAME,
radio_server =>"https://myradio.com",
channel => "/test",
listen_url =>"http://radio:8000/test",
};
our $chat={ #hash to configure chat (candy prodody) server
chat_addr => "https://".CHAT_SRV,
chat_srv => CHAT_SRV,
chat_channel => 'Users@radio.'.CHAT_SRV,
};
our %rtmp={ #hash ro configure rtpm video server
rtmp_server =>"rtmp://myserver.com/steam",
rtmp_channel =>"channel",
};
our %def=( #some other global configuration
modules => MOD,
# layout => "default"
);
1;

0
lib/Dojo/Controller/Data.pm Normal file → Executable file
View File

0
lib/Dojo/Controller/Example.pm Normal file → Executable file
View File

0
lib/Dojo/Controller/Home.pm Normal file → Executable file
View File

0
lib/Dojo/Controller/Users.pm Normal file → Executable file
View File

0
lib/Dojo/Model/Users.pm Normal file → Executable file
View File

5
lib/Dojo/Model/Vuelo.pm Normal file → Executable file
View File

@@ -93,7 +93,10 @@ sub new { bless {}, shift };
sub contact{
my $c=shift;
my $q="insert into entrada (nombre,correo,pagina,texto,fecha) values(?,?,?,?,now() )" ;
return _writemsg($q,@_);
my @a=@_;
#simple method to ignore spam
return _writemsg($q,@a) unless $a[3]=~m/html|website|\<a/;
return 0;
}
#==============================================================================
# Write vdg admin ==============================================================

0
lib/Dojo/Support.pm Normal file → Executable file
View File