User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 18 Mar 2003, 07:39   #1
Rayden
Enforcer
 
Join Date: Jan 2003
Location: /dev/chair
Posts: 55
Rayden is an unknown quantity at this point
Coding an irc client?

Well, first of all i do not want to hear "why? there are so many out there already" that's not the point!

I've planned on doing this for quite sometime and after seeing all the challenges roaming around here i thought i might post it.

What i want to do is make a simple, text-based irc client on the unix platform. Reason i say simple is because i'm aiming for very high adaptabiliy and modification. Scripting support is therefore something valuable. I've not decided if it's going to be a client based language or just support for tcl/perl or whatnot.

Any suggestions just post. I'd like to maybe gather a team of people.
Rayden is offline   Reply With Quote
Unread 18 Mar 2003, 12:38   #2
Jester
Pedantic hypocrite
 
Jester's Avatar
 
Join Date: Jan 2001
Location: Back and to the left
Posts: 1,488
Jester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond repute
There's no real reason to gather a team, an IRC client is a small enough project that one should be able to handle it alone. I recommend reading up on ncurses. Perhaps a look through the irssi source would be informative. I believe titus has written his own (gui) client for X, and queball was in the process of writing a mIRC clone for linux. Personally I'd recommend scripting engines for perl, python and ruby. With those three you've covered most bases in the scripting world.

Irssi is written in C, but tbh that might be 'overkill' for an IRC client.

Jester
__________________
I always wanted to be a dancer, but I could never get the shit off my shoes
.......
Jester is offline   Reply With Quote
Unread 18 Mar 2003, 13:06   #3
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
You can use SWIG to generate interfaces for several languages automatically, if you know a bit of C or C++.
queball is offline   Reply With Quote
Unread 18 Mar 2003, 18:21   #4
meglamaniac
Born Sinful
 
meglamaniac's Avatar
 
Join Date: Nov 2000
Location: Loughborough, UK
Posts: 4,059
meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
One of my mates made a fairly advanced Java IRC client (http://freshmeat.net/projects/mtlirc/) - it's kinda not 100% finished but it shows you what one guy can do in his spare time.

Also, he's currently doing http://freshmeat.net/projects/mtlirc2msn/ which is a gateway to connect any IRC client to MSN Messenger - quite handy.

__________________
Worth dying for. Worth killing for. Worth going to hell for. Amen.
meglamaniac is offline   Reply With Quote
Unread 18 Mar 2003, 18:34   #5
NEWSBOT3
NEWSBOT
 
Join Date: Dec 2000
Location: The enby cave!
Posts: 4,872
NEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriendNEWSBOT3 needs a job and a girlfriend
a copy of the irc RFCs will likely be useful to you.
__________________
[20:27:47] <nodrog-aawy> **** i think my housemate just caught me masturbating
[11:25:32] <idimmu> you are a little piggy arent you
[13:17:00] <KaneED> i'm so closet i'm like narnia
__________________
Pretty parks and funky scrap metal things here
NEWSBOT3 is offline   Reply With Quote
Unread 18 Mar 2003, 20:06   #6
meglamaniac
Born Sinful
 
meglamaniac's Avatar
 
Join Date: Nov 2000
Location: Loughborough, UK
Posts: 4,059
meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Back again.
Basicly, all you need to make a basic IRC client is the ability to control sockets and the ability to parse text.
Specifically, text 'tokenisation' is useful as all IRC communication consists of a command portion and a text portion, which are seperated by a colon.

eg of sending something to a channel:
Code:
PRIVMSG #forums :this text gets sent to the channel
eg of recieving something from a channel:
Code:
:[email protected] PRIVMSG #planetarion :at Students Union
IRC issues control codes in some statements to enable clients to filter (and set and respond to) important information, states, and variables. For example, this the notification you get for the topic of #planetarion when you join:
Code:
:London.UK.Eu.Netgamers.org 332 megla #planetarion :PA Status: 'Westerly, Moderate to Good, rising slowly' || CH Log on the portal || Congrats to RIT for winning PA @ i15 || http://toolkit.planetarion.com [NEW: Battlecalc]
Here you can see the "channel topic is <blah>" control code is 332.
All of this info is available in the RFCs which NB3 nicely linked you to.
For display purposes, all the info is there in it's raw form which is why you can use IRC in telnet if you're insane enough (that's how I just got those raw outputs) but being in more than one channel at once quickly gets impossible to follow, so it's up to you to parse all the incomming statements and redirect them to different windows or however you plan to do it.
Parsing the text correctly is by far the hardest bit - the networking involved is about as simple as it gets.

__________________
Worth dying for. Worth killing for. Worth going to hell for. Amen.
meglamaniac is offline   Reply With Quote
Unread 18 Mar 2003, 21:06   #7
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
Lo, I believe Rayden knows what is involved in the protocol, and is asking for more high-level information. But it's strange that you say parsing is the hard bit. Parsing is easy with or without explicit regexps, the hardest thing (for me at least) is getting it to work properly on all the major networks and to interoperate properly with mIRC rather that just to the spec, and trying to build abstractions on a shaky protocol.

Projects in general? Start small, work hard. Write down your ideas if you have them. Try to do things somehow differently. Doing research is good, and fun.
queball is offline   Reply With Quote
Unread 18 Mar 2003, 21:32   #8
meglamaniac
Born Sinful
 
meglamaniac's Avatar
 
Join Date: Nov 2000
Location: Loughborough, UK
Posts: 4,059
meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
When you talk about interoperating with mIRC are you refering to DCC/fserve/CTCP?

__________________
Worth dying for. Worth killing for. Worth going to hell for. Amen.
meglamaniac is offline   Reply With Quote
Unread 18 Mar 2003, 22:28   #9
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
Quote:
Originally posted by meglamaniac
When you talk about interoperating with mIRC are you refering to DCC/fserve/CTCP?

Not DCC and CTCP per se since they have RFCs. I believe mIRC has weird quoting or something similar that took me a while to notice, and it is weirdness in general - small discrepencies to any standard - which make IRC protocol code laborious to write.
queball is offline   Reply With Quote
Unread 21 Mar 2003, 07:09   #10
Rayden
Enforcer
 
Join Date: Jan 2003
Location: /dev/chair
Posts: 55
Rayden is an unknown quantity at this point
what queball said.. i know the rfc.

yes i can do this alone, BUT.. three brains are better than one right?
Rayden is offline   Reply With Quote
Unread 21 Mar 2003, 07:26   #11
Jester
Pedantic hypocrite
 
Jester's Avatar
 
Join Date: Jan 2001
Location: Back and to the left
Posts: 1,488
Jester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond repute
Quote:
Originally posted by Rayden
what queball said.. i know the rfc.

yes i can do this alone, BUT.. three brains are better than one right?
Not necessarily true.

Jester
__________________
I always wanted to be a dancer, but I could never get the shit off my shoes
.......
Jester is offline   Reply With Quote
Unread 24 Mar 2003, 14:58   #12
Rayden
Enforcer
 
Join Date: Jan 2003
Location: /dev/chair
Posts: 55
Rayden is an unknown quantity at this point
no one wanted to help/join?

my email is [email protected] if anybody changes their minds ttyl
Rayden is offline   Reply With Quote
Unread 24 Mar 2003, 16:30   #13
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
Re: Coding an irc client?

Quote:
Originally posted by Rayden

What i want to do is make a simple, text-based irc client on the unix platform. Reason i say simple is because i'm aiming for very high adaptabiliy and modification. Scripting support is therefore something valuable. I've not decided if it's going to be a client based language or just support for tcl/perl or whatnot.
I would, but I feel its reinventing the wheel.

Also I got fking bored of writing stuff for irc after I did Samson.
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 17:44.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018