summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaura <the-ceo-of-antifa@protonmail.com>2023-01-05 15:40:17 +0100
committerLaura <the-ceo-of-antifa@protonmail.com>2023-01-05 15:40:17 +0100
commit48c4ab12c4195da2d9a1e0747f1166366a655e16 (patch)
treeb149ea63c2b1344f342448811c31c8862c1437dd
parent0e004369555929ad54a62e841f31adcca614874c (diff)
downloadmiaowe-48c4ab12c4195da2d9a1e0747f1166366a655e16.tar.gz
miaowe-48c4ab12c4195da2d9a1e0747f1166366a655e16.zip
Close file
-rw-r--r--miaowe.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/miaowe.hs b/miaowe.hs
index 7cdcb0d..a575bc2 100644
--- a/miaowe.hs
+++ b/miaowe.hs
@@ -200,8 +200,10 @@ mainLoop channel = waitForCommand
main :: IO ()
main =
openFile "conf" ReadMode
- >>= hGetLine
- >>= putStr . ircConnect
+ >>= (\handle ->
+ hGetLine handle
+ >>= putStr . ircConnect
+ >> hClose handle)
>> hFlush stdout
>> waitForCloak
>> hFlush stdout