# HG changeset patch # User Matti Hamalainen # Date 1594203828 -10800 # Node ID 028ee7efd4ffcd63078ff56e6b7d50fbe1ddceed # Parent 717a1c84df4c3c69968fe484726ecfef9ea13fa2 weather: Cleanups. diff -r 717a1c84df4c -r 028ee7efd4ff weather.tcl --- a/weather.tcl Wed Jul 08 12:12:57 2020 +0300 +++ b/weather.tcl Wed Jul 08 13:23:48 2020 +0300 @@ -52,18 +52,15 @@ } -proc weather_msg {apublic anick achan aid {aargs {}}} { +proc weather_smsg {apublic anick achan amsg {aargs {}}} { global weather_preferredmsg - set amsg [weather_qm $aid] set amsg [string map [list "@cmd@" "!sää"] $amsg] utl_msg_args $weather_preferredmsg $apublic $anick $achan $amsg $aargs } -proc weather_smsg {apublic anick achan amsg {aargs {}}} { - global weather_preferredmsg - set amsg [string map [list "@cmd@" "!sää"] $amsg] - utl_msg_args $weather_preferredmsg $apublic $anick $achan $amsg $aargs +proc weather_msg {apublic anick achan aid {aargs {}}} { + weather_smsg $apublic $anick $achan [weather_qm $aid] $aargs } @@ -316,7 +313,7 @@ #------------------------------------------------------------------------- -proc weather_cmd {unick uhand uchan uargs upublic} { +proc weather_cmd {unick $uhost uhand uchan uargs upublic} { global weather_default_locations weather_data weather_max_results weather_aliases global weather_msg_list_station weather_msg_result weather_messages @@ -558,7 +555,7 @@ global weather_channels if {[utl_match_delim_list $weather_channels $uchan]} { - return [weather_cmd $unick $uhand $uchan $uargs 1] + return [weather_cmd $unick $uhost $uhand $uchan $uargs 1] } return 0 @@ -566,7 +563,7 @@ #------------------------------------------------------------------------- proc weather_cmd_msg {unick uhost uhand uargs} { - return [weather_cmd $unick $uhand "PRIV" $uargs 0] + return [weather_cmd $unick $uhost $uhand "PRIV" $uargs 0] } # end of script