Repos / gorts / 32953c0354
commit 32953c0354fdc273898a4c416f631189fcb50526
Author: Nhân <hi@imnhan.com>
Date: Thu Jun 22 20:09:03 2023 +0700
rig up player suggestion too
diff --git a/tcl/main.tcl b/tcl/main.tcl
index 92d5b1d..006f7d1 100644
--- a/tcl/main.tcl
+++ b/tcl/main.tcl
@@ -178,7 +178,7 @@ proc initialize {} {
loadplayernames
setupdiffcheck
- #setupplayersuggestion
+ setupplayersuggestion
# By default this window is not focused and not even brought to
@@ -280,24 +280,12 @@ proc setupplayersuggestion {} {
}
set newvalue $::scoreboard($key)
set widget .n.m.players.$key
- set matches [searchplayers $newvalue]
+ set matches [ipc "searchplayers" $newvalue]
$widget configure -values $matches
}
trace add variable ::scoreboard write update_suggestions
}
-proc searchplayers {query} {
- set playernames {}
- puts "searchplayers"
- puts $query
- set line [gets stdin]
- while {$line != "end"} {
- lappend playernames $line
- set line [gets stdin]
- }
- return $playernames
-}
-
proc fetchplayers {} {
.n.s.fetch configure -state disabled
.n.s.token configure -state disabled