summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miaowe.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/miaowe.hs b/miaowe.hs
index 82ad8aa..88d3da7 100644
--- a/miaowe.hs
+++ b/miaowe.hs
@@ -22,6 +22,7 @@ import Data.Bits
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as S.Char8
import qualified Data.ByteString.Internal as S.Internal
+import Data.Char
import Data.List
import Data.Word
import System.Directory
@@ -202,7 +203,7 @@ getFortune = readCreateProcess ((shell "fortune | cowsay -b")) ""
processCommand :: IrcChannel -> MircString -> IO ()
processCommand channel command | length (words command) < 5 = sendToChannel channel
"You need to specify a command."
- | otherwise = case (words command)!!4 of
+ | otherwise = case map toLower ((words command)!!4) of
"quit" -> exitSuccess
"list" -> listDirectory "."
>>= sendToChannel channel .