summaryrefslogtreecommitdiff
path: root/Hsbot/Plugin
diff options
context:
space:
mode:
authorJulien Dessaux2011-10-01 00:49:49 +0200
committerJulien Dessaux2011-10-01 00:49:49 +0200
commit7cefea4cbc17dda9cb59b8cb93c81472ce323225 (patch)
tree584855f8384790e99a080507aa9916319fd3d658 /Hsbot/Plugin
parentCosmetics. (diff)
downloadhsbot-7cefea4cbc17dda9cb59b8cb93c81472ce323225.tar.gz
hsbot-7cefea4cbc17dda9cb59b8cb93c81472ce323225.tar.bz2
hsbot-7cefea4cbc17dda9cb59b8cb93c81472ce323225.zip
Other cosmetics + version upgrade.
Diffstat (limited to '')
-rw-r--r--Hsbot/Plugin/Duck.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Hsbot/Plugin/Duck.hs b/Hsbot/Plugin/Duck.hs
index 1044591..c630c6a 100644
--- a/Hsbot/Plugin/Duck.hs
+++ b/Hsbot/Plugin/Duck.hs
@@ -82,7 +82,7 @@ theDuck (DuckArgs channel seconds) = do
ducksWaitingForDeath <- if empty then return 0
else liftIO $ modifyMVar ducksMVar (\x -> return (x - shots, x))
_ <- update' statDB . UpdateScore (getSender msg) $ computeScore ducksWaitingForDeath shots
- when (and [ ducksWaitingForDeath > 0, shots >= ducksWaitingForDeath ]) $ do
+ when ((ducksWaitingForDeath > 0) && (shots >= ducksWaitingForDeath)) $ do
_ <- liftIO $ takeMVar ducksMVar
time <- liftIO $ readMVar timeMVar
duckSpawner channel time ducksMVar