Mercurial > hg > egg-tcls
diff tj.tcl @ 633:bc87660aa400
tj: Add max items as configurable setting.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 16 Feb 2021 12:26:40 +0200 |
parents | 68b8cf87e86e |
children | fd1c56676648 |
line wrap: on
line diff
--- a/tj.tcl Mon Feb 15 13:42:42 2021 +0200 +++ b/tj.tcl Tue Feb 16 12:26:40 2021 +0200 @@ -207,7 +207,7 @@ # ------------------------------------------------------------------------ proc tj_cmd {unick $uhost uhand uchan uargs upublic} { - global tj_messages tj_default_id tj_default_time tj_default_desc + global tj_messages tj_default_id tj_default_time tj_default_desc tj_max_items # Check if we have a valid user if {![utl_valid_user $uhand]} { @@ -344,8 +344,8 @@ } # Check for maximum reminders - if {$nitems > 5} { - tj_msg $upublic $unick $uchan "err_too_many" [list $nitems] + if {$nitems >= $tj_max_items} { + tj_msg $upublic $unick $uchan "err_too_many" [list $nitems $tj_max_items] return 1 }