New guestbook CGI script
This commit is contained in:
parent
13924d7f61
commit
63d130d6b5
@ -22,20 +22,20 @@ my $q = CGI->new();
|
|||||||
# Open banned phrases file
|
# Open banned phrases file
|
||||||
open(my $thoughtCrimes, '.msg.bans') or die "$@";
|
open(my $thoughtCrimes, '.msg.bans') or die "$@";
|
||||||
# Open banned users file
|
# Open banned users file
|
||||||
open(my $nameBans, '.name.bans') or die "$@";
|
open(my $nameBans, '.name.bans') or die "$@";
|
||||||
|
|
||||||
# Get creds file
|
# Get creds file
|
||||||
my $dotfile = ".mmCreds.xml";
|
my $dotfile = ".mmCreds.xml";
|
||||||
# Create XML::LibXML object
|
# 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
|
# Grab the values from creds file
|
||||||
my $user = $dom->findnodes('/credentials/username')->to_literal();
|
my $user = $dom->findvalue('/credentials/username');
|
||||||
my $pass = $dom->findnodes('/credentials/password')->to_literal();
|
my $pass = $dom->findvalue('/credentials/password');
|
||||||
my $url = $dom->findnodes('/credentials/base_url')->to_literal();
|
my $url = $dom->findvalue('/credentials/base_url');
|
||||||
my $chan = $dom->findnodes('/credentials/channel_id')->to_literal();
|
my $chan = $dom->findvalue('/credentials/channel_id');
|
||||||
my $spam = $dom->findnodes('/credentials/spam_chan_id')->to_literal();
|
my $spam = $dom->findvalue('/credentials/spam_chan_id');
|
||||||
# Put the values into place
|
# Put the values into place
|
||||||
my %conf = (
|
my %conf = (
|
||||||
authenticate => 1,
|
authenticate => 1,
|
||||||
username => "$user",
|
username => "$user",
|
||||||
password => "$pass",
|
password => "$pass",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user