diff options
-rw-r--r-- | miaowe.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 . |