]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/insult.pl
ws
[infobot.git] / src / Modules / insult.pl
index 662542d57de6c63fd75bbc1dcbe5cbc926e7e0e9..79b85e9d1820d66bf297f1c2cfb2b03b232fad68 100644 (file)
@@ -1,15 +1,16 @@
 #
 # insult.pl: insult engine
-#       ???: ???
+#      TODO: move this code out to a common file like I did with DNS.
+#           => use the command hooks system aswell
 #
 
-use strict;
-
 package Insult;
 
+use strict;
+
 sub Insult {
     my ($insultwho) = @_;
-    return unless &loadPerlModule("Net::Telnet");
+    return unless &::loadPerlModule("Net::Telnet");
 
     my $t = new Net::Telnet(Timeout => 3);
     $t->Net::Telnet::open(Host => "insulthost.colorado.edu", Port => "1695");
@@ -17,11 +18,11 @@ sub Insult {
 
     $line = "No luck, $::who" unless (defined $line);
 
-    if ($insultwho ne $::who) { 
+    if ($insultwho ne $::who) {
        $line =~ s/^\s*You are/$insultwho is/i;
     }
 
-    &performStrictReply($line);
+    &::pSReply($line);
 }
 
 1;