B4A Library IRC Library

This is a library to communicate with an IRC server.

The demo shows how information is passed back to your app.

Everything is sent to the log in the demo, it's up to you how you display it on your device.
 

Attachments

  • IRC Class and Demo.zip
    14.8 KB · Views: 307

abay1968

Member
Licensed User
Longtime User
This is a library to communicate with an IRC server.

The demo shows how information is passed back to your app.

Everything is sent to the log in the demo, it's up to you how you display it on your device.

Problem sending message! Message truncated, only the first word sent.
 

GMan

Well-Known Member
Licensed User
Longtime User
Is this project still alive / supportet ?

Problem connecting:
Found your hostname
adams.freenode.net sent you a notice:
adams.freenode.net NOTICE * :*** No Ident response
 

GMan

Well-Known Member
Licensed User
Longtime User
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
 

IanMc

Well-Known Member
Licensed User
Longtime User
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.

http://en.wikipedia.org/wiki/PIRCH
 
Last edited:

IanMc

Well-Known Member
Licensed User
Longtime User
Ooh, it's a devil isn't it only sending one word.

I figured it out though :)

It's not obviously apparent mind you!

I had a look through the Request For Comments for IRC here:
http://tools.ietf.org/html/rfc1459

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:

IRC.Send("PRIVMSG " & Channel & " :" & Txt)
 

GMan

Well-Known Member
Licensed User
Longtime User
Yo IanMc,

LIKE :)
 

IanMc

Well-Known Member
Licensed User
Longtime User
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.
 

gruizelgruis

Member
Licensed User
Longtime User
Hi Ianmc , is project still uptodate. I like to use it and do have some questions.
 
Top