With this code i get connected, but as at abay1968 only the first word is sended when clicking a send button:
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.RemoveAllViews
Activity.LoadLayout ("chat")
IRC.Initialize(Me, "chat", Server, 6667, Nick, Channel)
SendMessage("113, 6667 : " & Nick & " : UNIX : " & Password)
End Sub
You'll need a decent Windows IRC client to test this and I have to say that my absolute favourite is Pirch98
It's ancient originally written for windows98 but once you get used to it it's still the best in my humble opinion.
It doesn't have much in the way of downloading appz via DCC etc. but just about everything you do opens in a new window so you can have multiple chat windows open and connect to multiple servers (that's the big one for me) at the same time.
If you are making an IRC client for Android then PirchIRC is really good for testing.
and JUST before I fell asleep I noticed that the PRIVMSG examples always had a colon : character before the text so I tried that and it works, doesn't show the colon but does show all the words separated by spaces
So....
SendText = ":" & SendText
SendMessage(SendText)
Tadaaa!
Or you could just alter the line in the SendMessage Sub thusly:
Actually IRC isn't that complex, neither is Tellnet, bog standard FTP gets a bit complex as you need to use two channels, one for data and one for commands but I've done it before.
Really we should be using Erel's Network library that comes with B4a to write our own IRC classes
However it is nice just to plug in someone else's lib that does it all for you
We may still have to as this lib doesn't always connect and I can't see why from the raw data.