SuperStrict
Print("------->IRC rating bot")
Print("--------->By Catdaemon")
Global inpServer$=Input("Server? >")
Global inpPort%=Int(Input("Port? >"))
Global lend$="~r~n"
Global socket:Tsocket=CreateTCPSocket()
If ConnectSocket(socket,HostIp(inpServer),inpPort) Then
Global stream:Tsocketstream=CreateSocketStream(socket)
Print("Connection established")
stream.writeline("NICK RatingBot")
stream.writeline("USER RatingBot 8 * :RatingBot")
While SocketConnected(socket)
Local line$=ReadLine(stream)
Print(line)
If line.StartsWith("PING :") Then
line.Replace("PING :","PONG ")
WriteLine(stream,line)
EndIf
Wend
Else
Print("Failed to connect")
EndIf