IonicWind Software

IWBasic => Network Client/Server programming => Topic started by: Ionic Wind Support Team on March 09, 2009, 11:01:30 PM

Title: IRC demo executable
Post by: Ionic Wind Support Team on March 09, 2009, 11:01:30 PM
Hello all,

Attached to this message is a demo executable.  It is a simple IRC client that can be used to connect to IRC servers and join chats.  The client handles IRC color codes as well as font settings such as bold, italic, and underline.

I wrote this for another user and he's given me the permission to sell the source if I want to.

Anyone interested in the source can get it for a $25 donation.

Usage:
After starting the executable enter a username and nickname, the server and port are filled in with a known working IRC server.  Pick a unique username please, if you all try and use the default obviously the server will reject it.

Use /list to get a room(channel) list and /join to join a room.  An example would be:

/join #trivia

To leave leave the channel use

/part #trivia

The program handles a large majority of IRC commands, uses a rich edit for nice text attributes, and is a good example of how to use the Network Client/Server library to process and parse text from a server. 

Note that this isn't a replacement for a full IRC client, but it can be easily extended and there is much to be learned from the source.

Thanks for trying it out,
Paul.
Title: Re: IRC demo executable
Post by: Allan on March 10, 2009, 01:10:40 AM
Very Neat!!!
Title: Re: IRC demo executable
Post by: talun on March 10, 2009, 01:35:06 AM
Paul,
I'm very intersted to the source code;  if possible I would like to know if there is a link for the purchase

thanks

Sergio
Title: Re: IRC demo executable
Post by: Ionic Wind Support Team on March 10, 2009, 06:40:39 AM
Just use the $25 donation link here:

http://www.ionicwind.com/forums/index.php/topic,2597.0.html

And add a note that it was for the IRC source.

Thanks,
Paul.
Title: Re: IRC demo executable
Post by: Ionic Wind Support Team on March 10, 2009, 07:54:24 AM
Just a note...

You will need the latest Emergence (1.69) and of course the Network Client/Server library to compile it. 

Paul.
Title: Re: IRC demo executable
Post by: DominiqueB on March 10, 2009, 01:02:58 PM
hello Paul,

i've just paid 25 $ for the irc code source .

Thank's

Dominique
Title: Re: IRC demo executable
Post by: Ionic Wind Support Team on March 10, 2009, 02:34:56 PM
Dominique,
Thanks.  Email sent with details.

Paul.
Title: Re: IRC demo executable
Post by: Ionic Wind Support Team on March 10, 2009, 09:57:08 PM
James...I left debug information in the example in case someone ran into an exception, the exception reports are much more useful that way ;)

Paul.
Title: Re: IRC demo executable
Post by: barry on March 12, 2009, 04:19:51 PM
I just tried it in a channel on irchighway that I was already logged into using Mirc and while it seemed to work fine watching it from itself, watching it from Mirc I saw that it only seemed to be sending the first word I typed.  I asked others in the channel and they were also seeing only the first word.  They were all using Mirc as well.

In.order.to.type.a.sentence.I.had.to.do.it.without.spaces.

Barry
Title: Re: IRC demo executable
Post by: Ionic Wind Support Team on March 12, 2009, 05:00:06 PM
Barry,
Actually I've used it on a couple of IRC servers without problems.

But I can hazard a guess.  There is a discrepancy in the RFC document for the IRC protocol dealing with both NOTICE and PRIVMSG.  A NOTICE or PRIVMSG only has one parameter so a client/server should not try and break up a text line using space delimiters while processing those messages.  IRC uses spaces as delimiters for any message that has more than one.

So try typing a colon as the first character of the typed message like so.

:all good men should come to the aid of their party.

And see if that works.  If it does than either Mirc is not following the RFC specs or irchighway isn't.  The colon would be ignored by any properly coded client so I can force it to be there.

Paul.
Title: Re: IRC demo executable
Post by: Ionic Wind Support Team on March 12, 2009, 05:09:29 PM
Updated the executable.  Including the colon as the first character was trivial.

For those that have the source change this line (around line 208) from:


ret = "PRIVMSG #"+gstrRoom+" "+text


to:


ret = "PRIVMSG #"+gstrRoom+" :"+text


Which is a space followed by a colon before +text

Paul.
Title: Re: IRC demo executable
Post by: barry on March 12, 2009, 06:22:15 PM
I just tried it again and it worked fine. :)

Barry
Title: Re: IRC demo executable
Post by: Ionic Wind Support Team on April 29, 2009, 10:31:21 PM
Another fix.

For those that have the source change the line (around line 273)

From:

usercmd = "PONG localhost"

TO:

usercmd = "PONG "+ltrim$(rtrim$(params[0]))

Download in first post updated.