diff options
Diffstat (limited to 'miaowe.hs')
-rw-r--r-- | miaowe.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -257,10 +257,15 @@ processCommand channel command | length (words command) < 5 = sendToChannel chan a command." | otherwise = doCommand channel command +commandChannel :: String -> String +commandChannel command = (words command)!!2 + mainLoop :: IrcChannel -> IO () mainLoop channel = waitForCommand >>= \line -> - processCommand channel line + (if commandChannel line == channel + then processCommand channel line + else return ()) >> mainLoop channel |