summaryrefslogtreecommitdiff
path: root/miaowe.hs
diff options
context:
space:
mode:
authorLaura <the-ceo-of-antifa@protonmail.com>2023-01-18 22:14:57 +0100
committerLaura <the-ceo-of-antifa@protonmail.com>2023-01-18 22:30:13 +0100
commit7cd4f6ea6999f8b88a03c93d8d9ef306d4356065 (patch)
treeb90ff6191969bb4dacf7cfaa5b8f54bc9f3fd432 /miaowe.hs
parentc5396149fd708905632762327f9f7a88a0da533c (diff)
downloadmiaowe-7cd4f6ea6999f8b88a03c93d8d9ef306d4356065.tar.gz
miaowe-7cd4f6ea6999f8b88a03c93d8d9ef306d4356065.zip
Allow 'miaowe,' as command prefix for the Hexchat users out there
Diffstat (limited to 'miaowe.hs')
-rw-r--r--miaowe.hs6
1 files changed, 4 insertions, 2 deletions
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