mirror of
https://github.com/pragma-/pbot.git
synced 2025-11-13 04:57:26 +01:00
applets/insult.pl: website defunct; use scraped insults instead
This commit is contained in:
parent
c60888088e
commit
828412e931
24
applets/insult.pl
vendored
24
applets/insult.pl
vendored
@ -1,15 +1,21 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2009-2023 Pragmatic Software <pragma78@gmail.com>
|
# SPDX-FileCopyrightText: 2009-2025 Pragmatic Software <pragma78@gmail.com>
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use LWP::Simple;
|
use warnings;
|
||||||
|
|
||||||
$_ = get("http://www.randominsults.net/");
|
srand;
|
||||||
if (/<strong><i>(.*?)\s*<\/i><\/strong>/) {
|
|
||||||
print "@ARGV", ': ' if @ARGV;
|
open my $fh, '<', 'insults.txt' or die $!;
|
||||||
print "$1\n";
|
|
||||||
} else {
|
my $line;
|
||||||
print "yo momma!";
|
|
||||||
|
while (<$fh>) {
|
||||||
|
$line = $_ if rand($.) < 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chomp $line;
|
||||||
|
print "@ARGV", ': ' if @ARGV;
|
||||||
|
print "$line\n";
|
||||||
|
|||||||
@ -25,7 +25,7 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4913,
|
BUILD_REVISION => 4914,
|
||||||
BUILD_DATE => "2025-10-21",
|
BUILD_DATE => "2025-10-21",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user