diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | miaowe.hs | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -27,3 +27,5 @@ To run: or: ./nya.sh <channel> <image_directory> + +Commands are used like this: `miaowe: help` or this: `miaowe, help`.
\ No newline at end of file @@ -160,7 +160,8 @@ waitForCloak = waitForMessage (\l -> (words l)!!1 == "396") waitForCommand :: IO String waitForCommand = waitForMessage (\l -> if ((length (words l)) >= 4) - then ((words l)!!3 == ":miaowe:") + then init ((words l)!!3) == ":miaowe" + && elem (last ((words l)!!3)) ":," else False) joinChannel :: String -> IO () @@ -192,7 +193,8 @@ trySendFile channel path = (doesFileExist (path) then sendFile channel (path) else - sendToChannel channel "No such file or command." + sendToChannel channel + "No such file or command." >> hFlush stdout)) #ifdef FORTUNE |