diff options
author | Laura <the-ceo-of-antifa@protonmail.com> | 2023-01-16 19:03:20 +0100 |
---|---|---|
committer | Laura <the-ceo-of-antifa@protonmail.com> | 2023-01-16 19:03:20 +0100 |
commit | 4657b2251d0a57e1059183807738d19b85ea9ea9 (patch) | |
tree | bba6bded3556301b40d19bfb246fb2db1176e2a5 /miaowe.hs | |
parent | 028a7662ca1c8f51859fbf9f7c54f80c290eff58 (diff) | |
download | miaowe-4657b2251d0a57e1059183807738d19b85ea9ea9.tar.gz miaowe-4657b2251d0a57e1059183807738d19b85ea9ea9.zip |
List command with associated dir structure change.
Diffstat (limited to 'miaowe.hs')
-rw-r--r-- | miaowe.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -184,6 +184,8 @@ processCommand :: IrcChannel -> MircString -> IO () processCommand channel command | length (words command) < 5 = sendToChannel channel "You need to specify a command." | (words command)!!4 == "Quit" = exitSuccess + | (words command)!!4 == "List" = listDirectory "." + >>= sendToChannel channel . intercalate "\n" | otherwise = (if isInfixOf "/" ((words command)!!4) then sendToChannel channel @@ -201,7 +203,7 @@ mainLoop channel = waitForCommand main :: IO () main = - openFile "conf" ReadMode + openFile "../conf" ReadMode >>= (\handle -> hGetLine handle >>= putStr . ircConnect |