- if {"$mt" == "off"} {
- return "I will not send you periodic messages."
- } elseif {"$mt" == "once"} {
- return "I will send you one informational message when I see you."
- } else {
- return "I'll send you a message every [showintervalsecs $mt 0]."
+ switch -exact $mt {
+ off {
+ return "I will not send you periodic messages."
+ }
+ once {
+ return "I will send you one informational message when I see you."
+ }
+ default {
+ return "I'll send you a message every [showintervalsecs $mt 0]."
+ }