return [showinterval [expr {[clock seconds] - $when}]]
}
- set result [expr {$value*$u}]
+proc parse_interval {specified min} {
+ if {![regexp {^([0-9]+)([a-z]+)$} $specified dummy value unit]} {
+ error "invalid syntax for interval"
+ }
+ switch -exact $unit {
+ s { set u 1 }
+ ks { set u 1000 }
+ m { set u 60 }
+ h { set u 3600 }
++ mb { set u 0.0864 }
++ b { set u 86.4 }
++ kb { set u 86400 }
+ default { error "unknown unit of time $unit" }
+ }
+ if {$value > 86400*21/$u} { error "interval too large" }
++ set result [expr {round($value*$u)}]
+ if {$result < $min} { error "interval too small (<${min}s)" }
+ return $result
+}
+
proc def_msgproc {name argl body} {
proc msg_$name "varbase $argl" "\
upvar #0 msg/\$varbase/dest d\n\
!help [<cmd>|<opt>|<topic>] !register [insecure|delete]
!seen <nick> !set [<opt> [<value>]] who [<nick>]
!summon <username> (See `help !identify', `help !blight-id')
-- !invite [<chan>] <nick>... Channel settings (see `help channel'):
-- !op [<chan>] !channel [<chan>] <setting> [....]
-- !leave [<chan>] Additional help topics:
-- !ping [<stuff ...>] !identify !identpass !invite !blight-id
- !tell <nick> <message ...>
- !kill <nick> [<reason>]
++ !invite [<chan>] <nick>... For channel managers (see `help channel'):
++ !leave [<chan>] !channel [<chan>] <setting> [....]
++ !ping [<stuff ...>] !op [<chan>]
++ !tell <nick> <message ...> Additional help topics:
++ !kill <nick> [<reason>] !identify !identpass !invite !blight-id
Send commands to me by /msg, or say them in channel with \! in front.
To get me on a channel, invite me. To become channel manager, op me.
set show your current settings
set <option> show the current setting of <option>
set <option> <value> set <option> to <value>
- Options: !timeformat ks|hms !marktime off|once|<!interval>
- !tellme ...
+ Options: !timeformat ks|hms|beat
+ !marktime off|once|<n>[k]s|<n>m|<n>h
++ !tellme ...
See also `help <option>', `help !register' and `help !identify'
:timeformat