From 91f9db5be7855d91d25eb9bdeb05a504d84ccecd Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 10 May 2011 23:21:50 +0200 Subject: Improving a bit the Ping module's code. --- Hsbot/Plugin/Ping.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Hsbot') 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) -- cgit v1.2.3