fix indentation

master
opfez 2021-10-08 19:22:55 +02:00
parent 728c255e9b
commit 00c8f6d5d9
1 changed files with 5 additions and 5 deletions

10
Anna.hs
View File

@ -13,7 +13,7 @@ import Control.Monad.Trans.Reader
hostname = "127.0.0.1"
port = 6667
name = "anna"
channels = ["#foo", "#bots"]
channels = ["#tildetown", "#bots"]
data Bot = Bot { socket :: Handle }
type Net = ReaderT Bot IO
@ -142,7 +142,7 @@ pong = write "PONG" $ ":" ++ name ++ "\r\n"
-- Connect to a server given its name and port number
connectTo :: N.HostName -> N.PortNumber -> IO Handle
connectTo host port = do
addr : _ <- N.getAddrInfo Nothing (Just host) (Just (show port))
sock <- N.socket (N.addrFamily addr) (N.addrSocketType addr) (N.addrProtocol addr)
N.connect sock (N.addrAddress addr)
N.socketToHandle sock ReadWriteMode
addr : _ <- N.getAddrInfo Nothing (Just host) (Just (show port))
sock <- N.socket (N.addrFamily addr) (N.addrSocketType addr) (N.addrProtocol addr)
N.connect sock (N.addrAddress addr)
N.socketToHandle sock ReadWriteMode