mIRC Home    About    Download    Register    News    Help

Topic Options
#66922 - 07/01/04 01:15 PM Making an IRC bot in C++. Some Q's...
cmad Offline
Babel fish

Registered: 06/01/04
Posts: 79
Loc: Greece
Well I thought of making a bot in C++. I saw in the forums that some people have, so that why I'm here to seek help.

The bad thing is that I'm not sure how to do it frown I've tried connecting to a server throught telnet and have figured out the general way the bot should work.

How would I connect to an IRC server through C++? I thought that maybe I could pipe output of telnet to my program. But what about my program's output. And I'm not sure that piping telnet output would really work. I think you see where the problem is...

Can anyone help plz?

Thanks in advance,
cmad

BTW: If you can forward me to some other forum (or some newsgroup) that you think is really good with this stuff, I'd be really grateful.


Edited by cmad (07/01/04 01:16 PM)
_________________________
My ally is the compiler, and a powerful ally it is!

Top
#66923 - 07/01/04 03:34 PM Re: Making an IRC bot in C++. Some Q's...
DekuHaze Offline
Fjord artisan

Registered: 28/06/03
Posts: 384
I'm no programmer, so can't help you that much. However, why not take a look at the eggdrop source code and see how Robey Pointer created it? Worth a try... smile

Top
#66924 - 07/01/04 04:23 PM Re: Making an IRC bot in C++. Some Q's...
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
If you have a firm understanding of sockets, its completly simplistic to connect. You said you used telnet to connect. Well, connect a socket, and send the exact same commands you used with telnet, thorugh your program. You know you need a USER with flags, then along with the NICK. From there, replying to a PING server is easy, just attack what follows the ping to a PONG responce. Fairly simple.

I'm not too into c\c++ sockets, but I've done one in C# and works fairly easy. If you need help with what all the commands mean, i would suggesting hitting google up for "irc rfc".
_________________________
-KingTomato

Top
#66925 - 07/01/04 05:25 PM Re: Making an IRC bot in C++. Some Q's...
cmad Offline
Babel fish

Registered: 06/01/04
Posts: 79
Loc: Greece
Hmm... Does GCC provide any tools for sockets?

If not, then probably I will have to use Kylix but I still like GCC better.

And yeah I'll try taking a look at Eggdrop source code.

So... any help? Does GCC provide socket tools?

Thanks,
cmad
_________________________
My ally is the compiler, and a powerful ally it is!

Top
#66926 - 07/01/04 05:49 PM Re: Making an IRC bot in C++. Some Q's...
cmad Offline
Babel fish

Registered: 06/01/04
Posts: 79
Loc: Greece
I just had a look at the eggdrop source code... I must wish me luck!!! crazy crazy
_________________________
My ally is the compiler, and a powerful ally it is!

Top
#66927 - 07/01/04 06:17 PM Re: Making an IRC bot in C++. Some Q's...
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
We wish you, too laugh

Top
#66928 - 12/01/04 10:56 AM Re: Making an IRC bot in C++. Some Q's...
cmad Offline
Babel fish

Registered: 06/01/04
Posts: 79
Loc: Greece
I started having Network Programming tutorials and I think I can achieve writting an IRC bot in C++ smile

Then I think that I will make a library with classes to make writting IRC bots in C++ easier smile

I just need to find a name for that library laugh

You guys will be the first to get a copy, I promise laugh
_________________________
My ally is the compiler, and a powerful ally it is!

Top
#66929 - 14/01/04 02:46 AM Re: Making an IRC bot in C++. Some Q's...
Gamersad Offline
Babel fish

Registered: 27/06/03
Posts: 56
Loc: American Samoa
I ran across something that might intrest you. I dont remember the URL for it but go to google and do a search. "Windrop" it runs like eggdrop. But it runs through windows. Its quite intresting. I havn't taken the time compleatly install the whole thing. I couldn't get it to work.
_________________________
- Andrew Berquist, Windfyre Network

Top
#66930 - 14/01/04 01:22 PM Re: Making an IRC bot in C++. Some Q's...
cmad Offline
Babel fish

Registered: 06/01/04
Posts: 79
Loc: Greece
but use Linux smile
_________________________
My ally is the compiler, and a powerful ally it is!

Top
#66931 - 15/01/04 01:47 PM Re: Making an IRC bot in C++. Some Q's...
cmad Offline
Babel fish

Registered: 06/01/04
Posts: 79
Loc: Greece
EDIT for the previous post: But I use Linux smile


About this post, I'm feeling way more comfortable with Network Programming now after certain tutorials I took...

1) I'll make a general networking bot / library
2) Maybe I'll make a more specific one about IRC
3) I'll make that all in C++... Should I try to do that in C as well?
4) I still can't find a name frown I'm not good at this frown Here's what I have in mind: GeNeBot (Generic Networking Bot) or GeNeLib, but it sounds too specific. Eggdrop sounds nicer.

Any ideas? :P
_________________________
My ally is the compiler, and a powerful ally it is!

Top