Mercurial > hg > egg-tcls
changeset 562:15bc88a1477a
weather: Add setting weather_cmd_name for specifying the command name used for help texts.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jul 2020 13:28:54 +0300 |
parents | bdccc83a1c22 |
children | 537df683836c |
files | config.weather.example weather.tcl |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/config.weather.example Thu Jul 09 13:25:09 2020 +0300 +++ b/config.weather.example Thu Jul 09 13:28:54 2020 +0300 @@ -18,6 +18,10 @@ bind msg - !saa weather_cmd_msg +# Name of the command used for help texts +set weather_cmd_name "!saa" + + ### ### Settings ###
--- a/weather.tcl Thu Jul 09 13:25:09 2020 +0300 +++ b/weather.tcl Thu Jul 09 13:28:54 2020 +0300 @@ -50,8 +50,8 @@ proc weather_smsg {apublic anick achan amsg {aargs {}}} { - global weather_preferredmsg - set amsg [string map [list "@cmd@" "!sää"] $amsg] + global weather_preferredmsg weather_cmd_name + set amsg [string map [list "@cmd@" $weather_cmd_name] $amsg] utl_msg_args $weather_preferredmsg $apublic $anick $achan $amsg $aargs }