diff --git a/auto b/auto index c3c18f7..d240160 100755 --- a/auto +++ b/auto @@ -1,4 +1,6 @@ #!/bin/sh + +# auto - Launcher. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # Written in sh because the user may not have Perl...to run Auto.... diff --git a/bin/auto b/bin/auto index 2eabc54..b872fc5 100755 --- a/bin/auto +++ b/bin/auto @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# bin/auto - Main file. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package Auto; diff --git a/bin/buildmod b/bin/buildmod index 2b0c815..30f7485 100755 --- a/bin/buildmod +++ b/bin/buildmod @@ -1,5 +1,6 @@ #!/usr/bin/env perl -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. + +# bin/buildmod - Module builder. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. use 5.010_000; diff --git a/bin/critic b/bin/critic index 0771851..ab7c3c8 100755 --- a/bin/critic +++ b/bin/critic @@ -1,5 +1,6 @@ #!/usr/bin/env perl -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. + +# bin/critic - Perl::Critic script. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. require 5.010000; diff --git a/bin/genssl b/bin/genssl index 99b4184..f2724df 100755 --- a/bin/genssl +++ b/bin/genssl @@ -1,5 +1,6 @@ #!/usr/bin/env perl -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. + +# bin/genssl - SSL CertFP generation script. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. diff --git a/install b/install index 0d5e9a2..f85bd47 100755 --- a/install +++ b/install @@ -1,5 +1,6 @@ #!/usr/bin/env perl -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. + +# install - Installation wizard. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package Install; diff --git a/lang/de.alf b/lang/de.alf index c02c385..4445bf2 100644 --- a/lang/de.alf +++ b/lang/de.alf @@ -1,9 +1,7 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lang/de.alf - German translation file. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. -# German translation file. - # Permission denied - Keine Berechtigung msge "Permission_denied" "Keine Berechtigung" diff --git a/lang/en.alf b/lang/en.alf index d795c53..3c5c5bf 100644 --- a/lang/en.alf +++ b/lang/en.alf @@ -1,9 +1,7 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lang/en.alf - English translation file. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. -# English translation file. - # Permission denied - Permission denied msge "Permission_denied" "Permission denied" diff --git a/lang/es.alf b/lang/es.alf index 458c3f1..5e6d2f8 100644 --- a/lang/es.alf +++ b/lang/es.alf @@ -1,10 +1,8 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lang/es.alf - Spanish translation file. +# Contributed by Matthew Burket. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. -# Spanish translation file. -# Contributed by Matthew Burket. - # Permission denied - Permiso denegado msge "Permission_denied" "Permiso denegado" diff --git a/lang/fr.alf b/lang/fr.alf index e615653..6bae3da 100644 --- a/lang/fr.alf +++ b/lang/fr.alf @@ -1,9 +1,7 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lang/fr.alf - French translation file. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. -# French translation file. - # Permission denied - Autorisation refusée msge "Permission_denied" "Autorisation refusée" diff --git a/lib/API/IRC.pm b/lib/API/IRC.pm index a661326..b952ba3 100644 --- a/lib/API/IRC.pm +++ b/lib/API/IRC.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/API/IRC.pm - IRC API subroutines. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# IRC API subroutines. package API::IRC; use strict; use warnings; diff --git a/lib/API/Log.pm b/lib/API/Log.pm index 3d839c9..37ae18a 100644 --- a/lib/API/Log.pm +++ b/lib/API/Log.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/API/Log.pm - API logging subroutines. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# API logging subroutines. package API::Log; use strict; use warnings; diff --git a/lib/API/Std.pm b/lib/API/Std.pm index e3b60fe..c7518d3 100644 --- a/lib/API/Std.pm +++ b/lib/API/Std.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/API/Std.pm - Standard API subroutines. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# Standard API subroutines. package API::Std; use strict; use warnings; diff --git a/lib/Core/Cmd.pm b/lib/Core/Cmd.pm index 2762398..0875579 100644 --- a/lib/Core/Cmd.pm +++ b/lib/Core/Cmd.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/Core/Cmd.pm - Core commands. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# Core::Cmd - Core commands. package Core::Cmd; use strict; use warnings; diff --git a/lib/Core/IRC.pm b/lib/Core/IRC.pm index ad132ed..28a9863 100644 --- a/lib/Core/IRC.pm +++ b/lib/Core/IRC.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/Core/IRC.pm - Core IRC hooks. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# Core::IRC - Core IRC hooks. package Core::IRC; use strict; use warnings; diff --git a/lib/DB/Flatfile.pm b/lib/DB/Flatfile.pm deleted file mode 100644 index 9a0f13f..0000000 --- a/lib/DB/Flatfile.pm +++ /dev/null @@ -1,133 +0,0 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. -# Copyright (C) 2010-2011 Xelhua Development Group, et al. -# This program is free software; rights to this code are stated in doc/LICENSE. - -# Database subroutines for the Auto-Flatfile database format. -package DB; -use strict; -use warnings; - -my (%MEM); - - -# Database initial loading. -sub load -{ - # Open, read and close the database. - open(my $FDB, q{<}, "$Auto::Bin/../etc/auto.db") or return 0; - my @fbuf = <$FDB> or return 0; - close $FDB or return 0; - - # Make sure the database version is compatible. - if ($fbuf[0] ne "DBV Auto-Flatfile_1.0\n") { - # It is not. Bail. - return 0; - } - - # Iterate the buffer. - foreach my $buff (@fbuf) { - # Check if the buffer is defined. - if (defined $buff) { - # Space buffer. - my @lbuf = split(' ', $buff); - - # Check if the first two values are defined. - if (defined $lbuf[0] and defined $lbuf[1]) { - # Make sure it isn't DBV. - if ($lbuf[0] eq "DBV") { - next; - } - # Get a count of the values in the buffer minus one. - my $c = scalar(@lbuf) - 1; - - # Create an array of the values excluding the first. - my @vs; - for (my $i = $c; $i <= $c; $i++) { - push(@vs, $lbuf[$i]); - } - - # Insert data into memory. - if (defined $MEM{$lbuf[0]}) { - # There is a database entry of the same name already, add to existing array. - push(@{ $MEM{$lbuf[0]} }, [ @vs ]); - } - else { - # This is the first database entry of this name, create an array. - @{ $MEM{$lbuf[0]} } = [ @vs ]; - } - } - } - } - return 1; -} - -# Database flush to disk. -sub flush -{ - my $wd = "DBV Auto-Flatfile_1.0\n"; - # Iterate through all the database data in memory. - foreach my $mek (keys %MEM) { - foreach my $mas (@{ $MEM{$mek} }) { - $wd .= $mek; - foreach my $masl (@{ $mas }) { - $wd .= " ".$masl; - } - $wd .= "\n"; - } - } - - # Write to disk. - unless (-e "$Auto::Bin/../etc/auto.db") { - `touch $Auto::Bin/../etc/auto.db`; - } - open(my $FDB, q{>}, "$Auto::Bin/../etc/auto.db") or return 0; - print $FDB $wd or return 0; - close $FDB or return 0; - - return 1; -} - -# Get database value. -sub get -{ - my ($name) = @_; - - if (defined $MEM{$name}) { - return $MEM{$name}; - } - else { - return 0; - } -} - -# Write to database. -sub mwrite -{ - my ($name, @values) = @_; - - if (defined $MEM{$name}) { - # There is a database entry of the same name already, add to existing array. - push(@{ $MEM{$name} }, [ @values ]); - } - else { - # This is the first database entry of this name, create an array. - @{ $MEM{$name} } = [ @values ]; - } - - return 1; -} - -# Delete from database. -sub mdelete -{ - my ($name, $i) = @_; - - if (defined $MEM{$name}[$i]) { - delete $MEM{$name}[$i]; - } - - return 1; -} - - -1; diff --git a/lib/Lib/Auto.pm b/lib/Lib/Auto.pm index c781563..ed702f3 100644 --- a/lib/Lib/Auto.pm +++ b/lib/Lib/Auto.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/Lib/Auto.pm - Core Auto subroutines. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package Lib::Auto; diff --git a/lib/Lib/Install.pm b/lib/Lib/Install.pm index 1d623f6..e7bab02 100644 --- a/lib/Lib/Install.pm +++ b/lib/Lib/Install.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/Lib/Install.pm - Installation subroutines. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package Lib::Install; diff --git a/lib/Parser/Config.pm b/lib/Parser/Config.pm index eb9e246..313ca68 100644 --- a/lib/Parser/Config.pm +++ b/lib/Parser/Config.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/Parser/Config.pm - Configuration parser. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# Parser::Config - Configuration parser. package Parser::Config; use strict; use warnings; diff --git a/lib/Parser/IRC.pm b/lib/Parser/IRC.pm index d26071b..8f6b56d 100644 --- a/lib/Parser/IRC.pm +++ b/lib/Parser/IRC.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/Parser/IRC.pm - Subroutines for parsing incoming data from IRC. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# Parser::IRC - Subroutines for parsing incoming data from IRC. package Parser::IRC; use strict; use warnings; diff --git a/lib/Parser/Lang.pm b/lib/Parser/Lang.pm index c4110da..a31b21c 100644 --- a/lib/Parser/Lang.pm +++ b/lib/Parser/Lang.pm @@ -1,8 +1,6 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# lib/Parser/Lang.pm - Language file parser. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. - -# Parser::Lang - Language file parser. package Parser::Lang; use strict; use warnings; diff --git a/modules/Badwords.pm b/modules/Badwords.pm index 8f4fc85..1d5b749 100644 --- a/modules/Badwords.pm +++ b/modules/Badwords.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: Badwords. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_Badwords; diff --git a/modules/Bitly.pm b/modules/Bitly.pm index 17df16b..748f309 100644 --- a/modules/Bitly.pm +++ b/modules/Bitly.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: Bitly. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_Bitly; diff --git a/modules/Calc.pm b/modules/Calc.pm index 55f1edd..72cc69b 100644 --- a/modules/Calc.pm +++ b/modules/Calc.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: Calc. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_Calc; diff --git a/modules/EightBall.pm b/modules/EightBall.pm index 0d828a2..03e098b 100644 --- a/modules/EightBall.pm +++ b/modules/EightBall.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: EightBall. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_EightBall; diff --git a/modules/FML.pm b/modules/FML.pm index 5707f4d..ef42533 100644 --- a/modules/FML.pm +++ b/modules/FML.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: FML. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_FML; diff --git a/modules/HelloChan.pm b/modules/HelloChan.pm index 0d14481..9b90ca2 100644 --- a/modules/HelloChan.pm +++ b/modules/HelloChan.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: HelloChan. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_HelloChan; diff --git a/modules/IsItUp.pm b/modules/IsItUp.pm index 8d7fd70..35d87be 100644 --- a/modules/IsItUp.pm +++ b/modules/IsItUp.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: IsItUp. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_IsItUp; diff --git a/modules/QDB.pm b/modules/QDB.pm index 6e67237..c65b122 100644 --- a/modules/QDB.pm +++ b/modules/QDB.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: QDB. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_QDB; diff --git a/modules/SASLAuth.pm b/modules/SASLAuth.pm index 6ca4ea6..c1bef0d 100644 --- a/modules/SASLAuth.pm +++ b/modules/SASLAuth.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: SASLAuth. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_SASLAuth; diff --git a/modules/Weather.pm b/modules/Weather.pm index 5150f29..cea440a 100644 --- a/modules/Weather.pm +++ b/modules/Weather.pm @@ -1,4 +1,4 @@ -# Auto IRC Bot. An advanced, lightweight and powerful IRC bot. +# Module: Weather. See below for documentation. # Copyright (C) 2010-2011 Xelhua Development Group, et al. # This program is free software; rights to this code are stated in doc/LICENSE. package m_Weather;