diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 36f967b2..a9d26ca6 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 554, + BUILD_REVISION => 555, BUILD_DATE => "2014-04-26", }; diff --git a/modules/cfaq.pl b/modules/cfaq.pl index 955901e3..7e49e5eb 100755 --- a/modules/cfaq.pl +++ b/modules/cfaq.pl @@ -53,9 +53,12 @@ foreach my $line (@contents) { if(defined $question_full) { $line =~ s/[\n\r]/ /g; - $line =~ s/(
|<\/pre>||<\/TT>|<\/a>)//g;
+    $line =~ s/(
|<\/pre>||<\/TT>|<\/a>|
)//g; $line =~ s///g; $line =~ s/ / /g; + $line =~ s/&/&/g; + $line =~ s/<//g; $question_full .= $line; $question_text .= $line; diff --git a/modules/codepad.pl b/modules/codepad.pl index 5f5a2a97..20c19d83 100755 --- a/modules/codepad.pl +++ b/modules/codepad.pl @@ -24,6 +24,7 @@ if($#ARGV <= 0) { my $nick = shift @ARGV; my $code = join ' ', @ARGV; + my $output; open FILE, ">> codepad_log.txt"; @@ -96,7 +97,7 @@ if($lang eq "C" or $lang eq "C++") { } if($lang eq "C" or $lang eq "C++") { - $code = pretty($code); +# $code = pretty($code); } $code =~ s/^\s+//; diff --git a/modules/get_title.pl b/modules/get_title.pl index 609e70f8..1a54a38e 100755 --- a/modules/get_title.pl +++ b/modules/get_title.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w -I /home/msmud/lib/lib/perl5/site_perl/5.10.0/ +#!/usr/bin/perl -w # Quick and dirty by :pragma @@ -6,8 +6,6 @@ use LWP::UserAgent; use HTML::Entities; use Text::Levenshtein qw(fastdistance); -my ($text); - if ($#ARGV <= 0) { print "Usage: title nick URL\n"; @@ -21,6 +19,7 @@ exit if($arguments =~ m/stackoverflow.com/i); exit if($arguments =~ m/scratch.mit.edu/i); exit if($arguments =~ m/imgur.com/i); exit if($arguments =~ m/sprunge.us/i); +exit if($arguments =~ m/pastebin.ws/i); exit if($arguments =~ m/hastebin.com/i); exit if($arguments =~ m/lmgtfy.com/i); exit if($arguments =~ m/gyazo/i); @@ -52,7 +51,7 @@ if (not $response->is_success) die "Couldn't get link: $arguments"; } -$text = $response->content; +my $text = $response->content; if($text =~ m/(.*?)<\/title>/msi) { @@ -112,5 +111,6 @@ if($distance / $length < 0.75) { } exit if $t =~ m/^Gerrit Code Review$/i; +exit if $t =~ m/pastebin/i; print "Title of $nick\'s link: $t\n" if length $t; diff --git a/modules/math.pl b/modules/math.pl index 29fa631e..2d3e666f 100755 --- a/modules/math.pl +++ b/modules/math.pl @@ -37,8 +37,9 @@ $response = eval("use POSIX qw/ceil floor/; use Math::Trig; use Math::Complex;" if($@) { my $error = $@; - $error =~ s/ at \(eval \d+\) line \d+.//; $error =~ s/[\n\r]+//g; + $error =~ s/ at \(eval \d+\) line \d+.//; + $error =~ s/ at EOF$//; $error =~ s/Died at .*//; print $error; exit 1;