]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/Weather.pl
* Add vim formatting comments ( # vim:ts=4:sw=4:expandtab:tw=80 )
[infobot.git] / src / Modules / Weather.pl
index 7cf8a94e58d8cc637eee315898bc7284b8be2a3b..d6a2f802e4cdd91e5a59429471863cd4936b4b73 100644 (file)
@@ -51,7 +51,7 @@ sub queryText {
        }
 
        my $ua = new LWP::UserAgent;
-       $ua->proxy('http', $::param{'httpProxy'}) if (&::IsParam("httpProxy"));
+       $ua->proxy('http', $::param{'httpProxy'}) if (&::IsParam('httpProxy'));
 
        $ua->timeout(10);
        my $request = new HTTP::Request('GET', "http://weather.noaa.gov/weather/current/$station.html");
@@ -60,11 +60,11 @@ sub queryText {
        if (!$response->is_success) {
            if ($response->code == 404) {
                return "I can't find station code \"$station\""
-                   . " (see http://www.nws.noaa.gov/oso/site.shtml "
-                       . " or http://www.nws.noaa.gov/tg/siteloc.shtml "
+                   . " (see http://www.nws.noaa.gov/oso/site.shtml"
+                   . " or http://www.nws.noaa.gov/tg/siteloc.shtml"
                    . " for ICAO locations codes).";
            } else {
-               return "Something failed in connecting to the NOAA web"
+               return 'Something failed in connecting to the NOAA web'
                    . " server. Try again later.";
            }
        }
@@ -105,7 +105,7 @@ sub queryText {
 
        if ($time) {
            if ($wxmode eq 'metar' && defined($feat{'ob'})) {
-               return ("METAR " . $place . ": " . $feat{'ob'});
+               return ('METAR ' . $place . ": " . $feat{'ob'});
            }
 
            $result = "$place; $id; last updated: $time";
@@ -132,6 +132,8 @@ if (0) {
 
 1;
 
+# vim:ts=4:sw=4:expandtab:tw=80
+
 __END__
 
 =head1 NAME