master
opfez 2021-12-17 19:56:28 +00:00
parent 7cf64b433f
commit c3e1c5dabb
1 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ anna = rollcall
write :: String -> String -> Net () write :: String -> String -> Net ()
write cmd args = do write cmd args = do
h <- asks socket h <- asks socket
liftIO $ hPutStr h $ output liftIO $ hPutStr h output
liftIO $ putStr $ "> " ++ output liftIO $ putStr $ "> " ++ output
where output = cmd ++ " " ++ args ++ "\r\n" where output = cmd ++ " " ++ args ++ "\r\n"
@ -174,7 +174,7 @@ joinChannels :: Net ()
joinChannels = mapM_ (\chn -> write "JOIN" chn) channels joinChannels = mapM_ (\chn -> write "JOIN" chn) channels
pong :: Net () pong :: Net ()
pong = write "PONG" $ ":" ++ name ++ "\r\n" pong = write "PONG" $ ":" ++ name
-- Connect to a server given its name and port number -- Connect to a server given its name and port number
connectTo :: N.HostName -> N.PortNumber -> IO Handle connectTo :: N.HostName -> N.PortNumber -> IO Handle