summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--miaowe.hs6
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 2abc586..abf9083 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/miaowe.hs b/miaowe.hs
index 88d3da7..cdd5b2b 100644
--- a/miaowe.hs
+++ b/miaowe.hs
@@ -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