summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2011-05-10 23:21:50 +0200
committerJulien Dessaux2011-05-10 23:21:50 +0200
commit91f9db5be7855d91d25eb9bdeb05a504d84ccecd (patch)
tree135b073b325d26d603bdcdd272f0b0c236820add
parentImplemented bot commands parsing. (diff)
downloadhsbot-91f9db5be7855d91d25eb9bdeb05a504d84ccecd.tar.gz
hsbot-91f9db5be7855d91d25eb9bdeb05a504d84ccecd.tar.bz2
hsbot-91f9db5be7855d91d25eb9bdeb05a504d84ccecd.zip
Improving a bit the Ping module's code.
Diffstat (limited to '')
-rw-r--r--Hsbot/Plugin/Ping.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Hsbot/Plugin/Ping.hs b/Hsbot/Plugin/Ping.hs
index 54ba396..6d28ef9 100644
--- a/Hsbot/Plugin/Ping.hs
+++ b/Hsbot/Plugin/Ping.hs
@@ -18,9 +18,7 @@ ping = PluginId
-- | The IrcPlugin monad main function
thePing :: Plugin (Env IO) ()
-thePing = forever $ do
- msg <- readMsg
- eval msg
+thePing = forever $ readMsg >>= eval
where
eval :: Message -> Plugin (Env IO) ()
eval (IncomingMsg msg)