Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Socket(sendData,recvData) where
- import System.IO
- import qualified Commands
- import qualified Network
- type ServerName = String
- type Port = Int
- type ChannelServ = String
- type Nick = String
- -- Connect
- connectSocket :: ServerName -> Port -> ChannelServ -> IO()
- connectSocket s p c= do
- socketClient <- connectTo s (PortNumber (fromIntegral Port))
- write socketClient (Commands.getNick "MiNombre")
- write socketClient (Commands.getUser "UserName" "irc.freenode.net" "ServerName" "MiNombre")
- write socketClient (Commands.joinIrc "#channelTest")
- listen socketClient
- return()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement