diff options
author | Laura <the-ceo-of-antifa@protonmail.com> | 2023-01-18 22:14:57 +0100 |
---|---|---|
committer | Laura <the-ceo-of-antifa@protonmail.com> | 2023-01-18 22:30:13 +0100 |
commit | 7cd4f6ea6999f8b88a03c93d8d9ef306d4356065 (patch) | |
tree | b90ff6191969bb4dacf7cfaa5b8f54bc9f3fd432 /miaowe.hs | |
parent | c5396149fd708905632762327f9f7a88a0da533c (diff) | |
download | miaowe-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.hs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |