From 7cd4f6ea6999f8b88a03c93d8d9ef306d4356065 Mon Sep 17 00:00:00 2001 From: Laura Date: Wed, 18 Jan 2023 22:14:57 +0100 Subject: Allow 'miaowe,' as command prefix for the Hexchat users out there --- miaowe.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'miaowe.hs') 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 -- cgit v1.2.3