summaryrefslogtreecommitdiff
path: root/miaowe.hs
diff options
context:
space:
mode:
Diffstat (limited to 'miaowe.hs')
-rw-r--r--miaowe.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/miaowe.hs b/miaowe.hs
index f03d4f2..f046198 100644
--- a/miaowe.hs
+++ b/miaowe.hs
@@ -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