# HG changeset patch # User Matti Hamalainen # Date 1483832659 -7200 # Node ID 0f7524550aa2658c7db180991678528378889177 # Parent db6e1d39db11c14f8d3296fc86e6ccca7697579f weather: Cosmetics, stray whitespace. diff -r db6e1d39db11 -r 0f7524550aa2 weather.tcl --- a/weather.tcl Sun Jan 08 00:58:09 2017 +0200 +++ b/weather.tcl Sun Jan 08 01:44:19 2017 +0200 @@ -46,7 +46,7 @@ if {$apublic == 1} { putserv "$weather_preferredmsg $achan :$amsg" } else { - putserv "$weather_preferredmsg $anick :$amsg" + putserv "$weather_preferredmsg $anick :$amsg" } } @@ -92,7 +92,7 @@ # Create dict array unset weather_aliases array set weather_aliases {} - + # Read datafile if {![catch {set ufile [open $weather_aliasfile r 0600]} uerrmsg]} { while {![eof $ufile]} { @@ -213,7 +213,7 @@ set weather_data($ukey) $udata - if {[string is double -strict $utemp]} { + if {[string is double -strict $utemp]} { if {$utemp < $wtemp_min_val} { set wtemp_min_key $ukey set wtemp_min_val $utemp @@ -226,7 +226,7 @@ } } close $ufile - + # Store min/max if {$wtemp_min_key != "" && $wtemp_max_key != ""} { set weather_data(w_min) $weather_data($wtemp_min_key) @@ -244,7 +244,7 @@ #------------------------------------------------------------------------- # Weather data update loop proc weather_exec {} { - global weather_check_period weather_running + global weather_check_period weather_running # Perform update weather_update @@ -317,7 +317,7 @@ foreach {ukey uvalue} [array get weather_data] { if {![string match "w_*" $ukey] && [string match -nocase "*${rarg}*" $ukey]} { - lappend result [weather_get_str $uvalue $weather_msg_list_station] + lappend result [weather_get_str $uvalue $weather_msg_list_station] } } @@ -332,7 +332,7 @@ weather_msg $upublic $unick $uchan $weather_msg_user_not_known return 0 } - + if {[llength $rarglist] == 1} { set lista [getuser $uhand XTRA "weather_locations"] if {$lista == "" || $lista == "{}"} { @@ -367,7 +367,7 @@ weather_usage $upublic $unick $uchan $weather_msg_usage_alias return 0 } - + set ualias [lindex $nlist 0] set uname [lindex $nlist 1] set weather_aliases($ualias) $uname @@ -446,18 +446,18 @@ } incr ufound } - - # Check for results limit + + # Check for results limit if {$nresults >= $weather_max_results} { return 0 } } - + if {$ufound == 0} { weather_msg $upublic $unick $uchan $weather_msg_no_data_for_location [list $rarg] } } - + # Check for results limit if {$nresults >= $weather_max_results} { return 0