Mercurial > hg > egg-tcls
changeset 344:25fc5a2b42ae
weather: Use utillib for matching enabled channels.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 20 Oct 2015 10:43:35 +0300 |
parents | 3fff571a904b |
children | 5c6cb115a7a1 |
files | weather.tcl |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/weather.tcl Sun Oct 04 14:34:03 2015 +0300 +++ b/weather.tcl Tue Oct 20 10:43:35 2015 +0300 @@ -15,6 +15,9 @@ ### you wish. See "config.weather.example" for an example config file. source [file dirname [info script]]/config.weather +### Required utillib.tcl +source [file dirname [info script]]/utillib.tcl + ########################################################################## # No need to look below this line @@ -466,10 +469,8 @@ proc weather_cmd_pub {unick uhost uhand uchan uargs} { global weather_channels - foreach akey [split $weather_channels ";"] { - if {[string match $akey $uchan]} { - return [weather_cmd $unick $uhand $uchan $uargs 1] - } + if {[utl_match_delim_list $weather_channels $uchan]} { + return [weather_cmd $unick $uhand $uchan $uargs 1] } return 0