summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaura <the-ceo-of-antifa@protonmail.com>2023-01-17 23:54:10 +0100
committerLaura <the-ceo-of-antifa@protonmail.com>2023-01-17 23:54:10 +0100
commitc5396149fd708905632762327f9f7a88a0da533c (patch)
tree7ff4622588b76ded3ad8f6a079001e29b226c303
parent2e4f14d2848d91aae83d60082dd6085431a663a8 (diff)
downloadmiaowe-c5396149fd708905632762327f9f7a88a0da533c.tar.gz
miaowe-c5396149fd708905632762327f9f7a88a0da533c.zip
forgot toLower
-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 .