summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miaowe.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/miaowe.hs b/miaowe.hs
index a575bc2..3778e23 100644
--- a/miaowe.hs
+++ b/miaowe.hs
@@ -181,7 +181,9 @@ trySendFile channel path = (doesFileExist (path)
>> hFlush stdout))
processCommand :: IrcChannel -> MircString -> IO ()
-processCommand channel command | (words command)!!4 == "Quit" = exitSuccess
+processCommand channel command | length (words command) < 5 = sendToChannel channel
+ "You need to specify a command."
+ | (words command)!!4 == "Quit" = exitSuccess
| otherwise = (if isInfixOf "/" ((words command)!!4)
then
sendToChannel channel