comparison weather.tcl @ 544:3b363fd0a60b

weather: Remove duplicated weather_save_aliases call.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 08 Jul 2020 00:47:35 +0300
parents a513b98f2a37
children 21aee5c2835c
comparison
equal deleted inserted replaced
543:a513b98f2a37 544:3b363fd0a60b
354 } 354 }
355 append res [join [lrange $result 0 10] " ; "] 355 append res [join [lrange $result 0 10] " ; "]
356 } else { 356 } else {
357 set res [weather_qm "stations_no_matches"] 357 set res [weather_qm "stations_no_matches"]
358 } 358 }
359
359 weather_msg $upublic $unick $uchan "stations_list" [list $res] 360 weather_msg $upublic $unick $uchan "stations_list" [list $res]
360 return 0 361 return 0
361 } elseif {$rcmd == "lahin" || $rcmd == "lähin" || $rcmd == "closest" || $rcmd == "nearest"} { 362 } elseif {$rcmd == "lahin" || $rcmd == "lähin" || $rcmd == "closest" || $rcmd == "nearest"} {
362 # List stations nearest to given coordinates 363 # List stations nearest to given coordinates
363 set qargs [join [lrange $rarglist 1 end] ""] 364 set qargs [join [lrange $rarglist 1 end] ""]
474 475
475 weather_msg $upublic $unick $uchan "alias_unset" [list $ualias $weather_aliases($ualias)] 476 weather_msg $upublic $unick $uchan "alias_unset" [list $ualias $weather_aliases($ualias)]
476 unset weather_aliases($ualias) 477 unset weather_aliases($ualias)
477 weather_save_aliases 478 weather_save_aliases
478 479
479 weather_save_aliases
480 return 0 480 return 0
481 } elseif {$rcmd == "list"} { 481 } elseif {$rcmd == "list"} {
482 # List all currently defined aliases 482 # List all currently defined aliases
483 set ulist {} 483 set ulist {}
484 set ulistitem [weather_qm "alias_item"] 484 set ulistitem [weather_qm "alias_item"]