This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
Torrevado
Op
Posts: 101 Joined: Wed Aug 02, 2006 6:29 pm
Post
by Torrevado » Tue Apr 29, 2008 7:11 pm
I'd like to translate "$idletime", would it be possible?
Code: Select all
proc whois:idle { from keyword arguments } {
set channel $::whoischannel
set target $::whoistarget
set idletime [lindex [split $arguments] 2]
set signon [lindex [split $arguments] 3]
whois:putmsg $channel "$target idle: [duration $idletime]. Signed on [ctime $signon]"
unbind RAW - 317 whois:idle
}
speechles
Revered One
Posts: 1398 Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)
Post
by speechles » Tue Apr 29, 2008 7:18 pm
Code: Select all
whois:putmsg $channel "$target idle: [string map {"years" "tyears"
"weeks" "tweeks" "days" "tdays" "hours" "thours" "minutes" "tminutes" "seconds" "tseconds"} [duration $idletime]]. Sined on [ctime $signon]"
Pretend the above is all on one line, the string map delineated by spaces. In the string map, change each reference starting with T to your translated word for each. String map can also be used for translating the signed on time.