summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-08-02 15:50:30 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-08-02 21:33:55 +0200
commite8ddf5e58c9e72647abe102713a9190c638cb07b (patch)
treee49d9f10466e3eb32bc5eb20d745584b5910ee56 /plugins
parent5bedd3918cc942ce4495f4418525c1d6f53cbfe7 (diff)
downloadxK-e8ddf5e58c9e72647abe102713a9190c638cb07b.tar.gz
xK-e8ddf5e58c9e72647abe102713a9190c638cb07b.tar.xz
xK-e8ddf5e58c9e72647abe102713a9190c638cb07b.zip
coin: wrap an if statement
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/coin6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/coin b/plugins/coin
index cf9b29b..3390b5f 100755
--- a/plugins/coin
+++ b/plugins/coin
@@ -97,7 +97,11 @@ while {[gets stdin line] != -1} {
set input [string range $input [string length $prefix] end]
if {$input == "coin"} {
- if {rand() < 0.5} { pmrespond "Heads." } else { pmrespond "Tails." }
+ if {rand() < 0.5} {
+ pmrespond "Heads."
+ } else {
+ pmrespond "Tails."
+ }
} elseif {[regexp {^dice( +|$)(.*)} $input -> _ args]} {
if {! [string is integer -strict $args] || $args <= 0} {
pmrespond "Invalid or missing number."