commit 9e74227ca00106b08d640436c6748dafd77092ec
parent 0ed7a98f9ac6f38dedf0546fd4e036f6411726d2
Author: phoebos <ben@bvnf.space>
Date: Tue, 9 Jan 2024 17:40:49 +0000
tcl: commit the running code
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/map.tcl b/map.tcl
@@ -87,7 +87,7 @@ proc store_ip_to_ll {db ipkey ip} {
proc get_lls {db} {
set lls {}
- $db eval {SELECT DISTINCT lat,long FROM ips JOIN names USING(ip)} {
+ $db eval {SELECT DISTINCT lat,long FROM ips,names WHERE ips.ip = names.ip} {
lappend lls [list $lat $long]
}
return $lls
@@ -210,10 +210,7 @@ proc static_map {lls fname creds} {
proc main {} {
lassign [parse_creds creds.json] ipkey creds
- set f [open whoips r]
- set txt [read $f]
- close $f
- set parsed [parse_who $txt]
+ set parsed [parse_who [get_who]]
set db [init_db]