2 # insult.pl: insult engine
3 # TODO: move this code out to a common file like I did with DNS.
4 # => use the command hooks system aswell
13 return unless &::loadPerlModule("Net::Telnet");
15 my $t = new Net::Telnet(Timeout => 3);
16 $t->Net::Telnet::open(Host => "insulthost.colorado.edu", Port => "1695");
17 my $line = $t->Net::Telnet::getline(Timeout => 4);
19 $line = "No luck, $::who" unless (defined $line);
21 if ($insultwho ne $::who) {
22 $line =~ s/^\s*You are/$insultwho is/i;