Mercurial > hg > egg-tcls
comparison quotedb.tcl @ 424:825cac46b1cb
Cosmetic / stray trailing whitespace cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 08 Jan 2017 03:55:55 +0200 |
parents | 880a07485275 |
children | 84d3d7abeb8a |
comparison
equal
deleted
inserted
replaced
423:44c9128097cd | 424:825cac46b1cb |
---|---|
141 append usql " AND user='[utl_escape $uhand]'" | 141 append usql " AND user='[utl_escape $uhand]'" |
142 set qextra "" | 142 set qextra "" |
143 } else { | 143 } else { |
144 set qextra " (owner/time override)" | 144 set qextra " (owner/time override)" |
145 } | 145 } |
146 | 146 |
147 qdb_handle eval $usql { | 147 qdb_handle eval $usql { |
148 set udiff [expr [unixtime] - $utime] | 148 set udiff [expr [unixtime] - $utime] |
149 if {$udiff < $maxdiff || $qoverride} { | 149 if {$udiff < $maxdiff || $qoverride} { |
150 set usql "DELETE FROM $utable WHERE id=$unum" | 150 set usql "DELETE FROM $utable WHERE id=$unum" |
151 if {![qdb_sql_exec $upublic $unick $uchan $usql]} { | 151 if {![qdb_sql_exec $upublic $unick $uchan $usql]} { |
354 set usql "SELECT id AS quoteID, utime AS utime, utext AS utext, user AS uuser FROM $utable $fquery ORDER BY utime DESC LIMIT $ulimit" | 354 set usql "SELECT id AS quoteID, utime AS utime, utext AS utext, user AS uuser FROM $utable $fquery ORDER BY utime DESC LIMIT $ulimit" |
355 qdb_handle eval $usql { | 355 qdb_handle eval $usql { |
356 incr uresults | 356 incr uresults |
357 qdb_msg $upublic $unick $uchan $qdb_msg_search_fmt [list $quoteID $utext $uuser $utime [utl_ctime $utime]] | 357 qdb_msg $upublic $unick $uchan $qdb_msg_search_fmt [list $quoteID $utext $uuser $utime [utl_ctime $utime]] |
358 } | 358 } |
359 | 359 |
360 if {$uresults == 0} { | 360 if {$uresults == 0} { |
361 qdb_msg $upublic $unick $uchan $qdb_msg_no_matches [list $unick] | 361 qdb_msg $upublic $unick $uchan $qdb_msg_no_matches [list $unick] |
362 return 0 | 362 return 0 |
363 } | 363 } |
364 return 1 | 364 return 1 |