]> git.donarmstrong.com Git - infobot.git/blobdiff - src/UserExtra.pl
- fixed "news #debian latest" - how did I break it?
[infobot.git] / src / UserExtra.pl
index 2467660d32be75ed35b5d04cbb6862a0c75f0da8..067370bf861739b88093dee1d38a6f0753ed61a5 100644 (file)
@@ -33,8 +33,7 @@ use vars qw(%channels %chanstats %cmdstats);
        Help => 'tell', Identifier => 'allowTelling',
        Cmdstats => 'Tell') );
 &addCmdHook("main", 'news', ('CODEREF' => 'News::Parse', 
-       Module => 'news', 'Cmdstats' => 'News',
-       Identifier => 'news' ) );
+       Module => 'news', 'Cmdstats' => 'News' ) );
 &addCmdHook("main", 'countrystats', ('CODEREF' => 'countryStats', 
 #      Forker => "NULL",
  ) );
@@ -356,7 +355,7 @@ sub tell {
        $message        = $tell_obj;
        $done++ unless (&Modules());
 
-       &VERB("teel: setting old values of who and msgType.",2);
+       &VERB("tell: setting old values of who and msgType.",2);
        $who            = $oldwho;
        $msgType        = $oldmtype;
 
@@ -390,6 +389,7 @@ sub DNS {
     my $dns = shift;
     my($match, $x, $y, $result);
     my $pid;
+    $dns =~ s/^\s+|\s+$//g;
 
     if ($dns =~ /(\d+\.\d+\.\d+\.\d+)/) {
        &status("DNS query by IP address: $in");
@@ -406,11 +406,11 @@ sub DNS {
 
     } else {
 
-       &status("DNS query by name: $in");
-       $x = join('.',unpack('C4',(gethostbyname($in))[4]));
+       &status("DNS query by name: $dns");
+       $x = join('.',unpack('C4',(gethostbyname($dns))[4]));
 
        if ($x !~ /^\s*$/) {
-           $result = $in." is ".$x;
+           $result = $dns." is ".$x;
        } else {
            $result = "I can\'t find that machine name";
        }