Yes willyw, that would make the ping reply proc output to the $nick
I also changed to
Code: Select all
unset pingchan($nick)
Code: Select all
unset pingchan($nick)
Code: Select all
set pingspending [dict create]
set pingcounter 0
proc ct:pub:ping {nick host hand chan text} {
global pingpending pingcounter
incr pingcounter
set who [lindex [split $text] 0]
dict set pingpending $pingcounter nick $nick
dict set pingpending $pingcounter chan $chan
dict set pingpending $pingcounter who $who
dict set pingpending $pingcounter time [clock clicks -milliseconds]
putquick "PRIVMSG $pingwho :\001PING $pingcounter\001"
}
proc ct:pingr {nick uhost hand dest keyword text} {
global pingpending
if {![dict exists $pingpending $text]} {return}
set data [dict get pingpending $text]
dict unset pingpending $text
set time [expr {([clock clicks -milliseconds] - [dict get $data time]) / 1000.000}]
set char "="
if {[expr {round($time / 0.5)}] > 10} {set red 10} else {set red [expr {round($time / 0.5)}]}
set green [expr {10 - $red}]
set output \00303[string repeat $char $green]\003\00304[string repeat $char $red]\003
if {($ctping(msg) == "0")} {
putquick "PRIVMSG [dict get $data chan] :\[\0030${colo}PING\003\] reply from $nick: \[\0030${colo}$time\003\] seconds $output"
} else {
putquick "NOTICE [dict get $data nick] :\[\0030${colo}PING\003\] reply from $nick: \[\0030${colo}$time\003\] seconds"
}
}