New guestbook CGI script

This commit is contained in:
swagg boi 2021-04-02 20:37:49 -04:00
parent 13924d7f61
commit 63d130d6b5

View file

@ -22,20 +22,20 @@ my $q = CGI->new();
# Open banned phrases file
open(my $thoughtCrimes, '.msg.bans') or die "$@";
# Open banned users file
open(my $nameBans, '.name.bans') or die "$@";
open(my $nameBans, '.name.bans') or die "$@";
# Get creds file
my $dotfile = ".mmCreds.xml";
my $dotfile = ".mmCreds.xml";
# Create XML::LibXML object
my $dom = XML::LibXML->load_xml(location => $dotfile);
my $dom = XML::LibXML->load_xml(location => $dotfile);
# Grab the values from creds file
my $user = $dom->findnodes('/credentials/username')->to_literal();
my $pass = $dom->findnodes('/credentials/password')->to_literal();
my $url = $dom->findnodes('/credentials/base_url')->to_literal();
my $chan = $dom->findnodes('/credentials/channel_id')->to_literal();
my $spam = $dom->findnodes('/credentials/spam_chan_id')->to_literal();
my $user = $dom->findvalue('/credentials/username');
my $pass = $dom->findvalue('/credentials/password');
my $url = $dom->findvalue('/credentials/base_url');
my $chan = $dom->findvalue('/credentials/channel_id');
my $spam = $dom->findvalue('/credentials/spam_chan_id');
# Put the values into place
my %conf = (
my %conf = (
authenticate => 1,
username => "$user",
password => "$pass",