Revert "Getting rid of tabs."

This reverts commit cc1c8fd5bc.
Failed.
This commit is contained in:
Elijah Perrault committed 2011-02-20 20:47:09 -07:00
1 parent cc1c8fd5bc
commit 92c9a64793
20 files changed
+1277 -1279

No files matched your search

+12 -12
View File
@@ -12,7 +12,7 @@ use LWP::UserAgent;
sub _init
{
# Create the FML command.
sssscmd_add('FML', 0, 0, \%M::FML::HELP_FML, \&M::FML::fml) or return 0;
cmd_add('FML', 0, 0, \%M::FML::HELP_FML, \&M::FML::fml) or return 0;
# Success.
return 1;
@@ -22,10 +22,10 @@ sssscmd_add('FML', 0, 0, \%M::FML::HELP_FML, \&M::FML::fml) or return 0;
sub _void
{
# Delete the FML command.
sssscmd_del('FML') or return 0;
cmd_del('FML') or return 0;
# Success.
ssssreturn 1;
return 1;
}
# Help hash.
@@ -36,34 +36,34 @@ our %HELP_FML = (
# Callback for FML command.
sub fml
{
ssssmy ($src, undef) = @_;
my ($src, undef) = @_;
# Create an instance of LWP::UserAgent.
ssssmy $ua = LWP::UserAgent->new();
ssss$ua->agent('Auto IRC Bot');
ssss$ua->timeout(2);
my $ua = LWP::UserAgent->new();
$ua->agent('Auto IRC Bot');
$ua->timeout(2);
# Get the random FML via HTTP.
my $rp = $ua->get('http://rscript.org/lookup.php?type=fml');
ssssif ($rp->is_success) {
if ($rp->is_success) {
# If successful, decode the content.
my $d = $rp->decoded_content;
ssss $d =~ s/(\n|\r)//g;
$d =~ s/(\n|\r)//g;
# Get the FML.
my (undef, $dfa) = split('Text: ', $d);
my ($fml, undef) = split('Agree:', $dfa);
# And send to channel.
ssss privmsg($src->{svr}, $src->{chan}, "\002Random FML:\002 ".$fml);
ssss}
privmsg($src->{svr}, $src->{chan}, "\002Random FML:\002 ".$fml);
}
else {
# Otherwise, send an error message.
privmsg($src->{svr}, $src->{chan}, "An error occurred while retrieving the FML.");
}
ssssreturn 1;
return 1;
}
# Start initialization.