From 63d130d6b5be17685a9923ce59e81bd2a1d3b0b9 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Fri, 2 Apr 2021 20:37:49 -0400 Subject: [PATCH] New guestbook CGI script --- cgi-bin/guest_mm.cgi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cgi-bin/guest_mm.cgi b/cgi-bin/guest_mm.cgi index 3134eb6..cdf9d42 100755 --- a/cgi-bin/guest_mm.cgi +++ b/cgi-bin/guest_mm.cgi @@ -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",