# HG changeset patch # User Matti Hamalainen # Date 1594290534 -10800 # Node ID 15bc88a1477a16b01bb1864665cfe34b444b9dc5 # Parent bdccc83a1c224e124b420e1b1141b7b0f383c995 weather: Add setting weather_cmd_name for specifying the command name used for help texts. diff -r bdccc83a1c22 -r 15bc88a1477a config.weather.example --- 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 ### diff -r bdccc83a1c22 -r 15bc88a1477a weather.tcl --- 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 }