Mercurial > hg > egg-tcls
changeset 548:028ee7efd4ff
weather: Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 08 Jul 2020 13:23:48 +0300 |
parents | 717a1c84df4c |
children | c6f389bef58e |
files | weather.tcl |
diffstat | 1 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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