Mercurial > hg > egg-tcls
comparison tj.tcl @ 424:825cac46b1cb
Cosmetic / stray trailing whitespace cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 08 Jan 2017 03:55:55 +0200 |
parents | a8954fd5cad5 |
children | 4f2bf10ceaa2 |
comparison
equal
deleted
inserted
replaced
423:44c9128097cd | 424:825cac46b1cb |
---|---|
79 set foo [split $uargs " "] | 79 set foo [split $uargs " "] |
80 set tjdays [lindex $foo 0] | 80 set tjdays [lindex $foo 0] |
81 set tjhours [lindex $foo 1] | 81 set tjhours [lindex $foo 1] |
82 if {$tjdays == ""} { | 82 if {$tjdays == ""} { |
83 tj_smsg $uchan "Hälärm." | 83 tj_smsg $uchan "Hälärm." |
84 return 1 | 84 return 1 |
85 } | 85 } |
86 | 86 |
87 if {$tjhours == ""} { set tjhours 0 } | 87 if {$tjhours == ""} { set tjhours 0 } |
88 | 88 |
89 set udate [expr [unixtime] + ($tjdays * 86400) + ($tjhours * 3600)] | 89 set udate [expr [unixtime] + ($tjdays * 86400) + ($tjhours * 3600)] |
143 | 143 |
144 set chandle [tj_correctnickcase $ihandle] | 144 set chandle [tj_correctnickcase $ihandle] |
145 | 145 |
146 # Haetaan TJ aloitus paivamaara | 146 # Haetaan TJ aloitus paivamaara |
147 set tjpaiva [getuser $chandle XTRA $tj_dateident] | 147 set tjpaiva [getuser $chandle XTRA $tj_dateident] |
148 | 148 |
149 if {$tjpaiva == ""} { | 149 if {$tjpaiva == ""} { |
150 return "$chandle ei ole asettanut itselleen TJ päivämäärää." | 150 return "$chandle ei ole asettanut itselleen TJ päivämäärää." |
151 } | 151 } |
152 | 152 |
153 # Lasketaan tamanhetkinen TJ aika | 153 # Lasketaan tamanhetkinen TJ aika |
154 set deltatj [expr $tjpaiva - [unixtime]] | 154 set deltatj [expr $tjpaiva - [unixtime]] |
155 | 155 |
156 if {$deltatj < 0} { | 156 if {$deltatj < 0} { |
157 set tmp [expr [unixtime] - $tjpaiva] | 157 set tmp [expr [unixtime] - $tjpaiva] |
158 } else { | 158 } else { |
159 set tmp $deltatj | 159 set tmp $deltatj |
160 } | 160 } |
161 | 161 |
179 tj_append lause $vuodet "$vuodet vuotta" "" | 179 tj_append lause $vuodet "$vuodet vuotta" "" |
180 tj_append lause $aamut "$aamut aamua" ", " | 180 tj_append lause $aamut "$aamut aamua" ", " |
181 tj_append lause $tunnit "$tunnit tuntia" " ja " | 181 tj_append lause $tunnit "$tunnit tuntia" " ja " |
182 | 182 |
183 if {$aamut == 0 && $deltatj > 0} { | 183 if {$aamut == 0 && $deltatj > 0} { |
184 if {$tunnit == 0} { | 184 if {$tunnit == 0} { |
185 return "$tjmt TOSI WÄINÖ! TJ 0!!" | 185 return "$tjmt TOSI WÄINÖ! TJ 0!!" |
186 } else { | 186 } else { |
187 return "$tjmt AIKA WÄBÄ -- TJ $tunnit tuntia!" | 187 return "$tjmt AIKA WÄBÄ -- TJ $tunnit tuntia!" |
188 } | 188 } |
189 } else { | 189 } else { |