mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
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.

Last edited by cmad; 07/01/04 01:16 PM.

My ally is the compiler, and a powerful ally it is!
Joined: Jun 2003
Posts: 384
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2003
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

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
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!
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
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!
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
We wish you, too laugh

Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
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!
Joined: Jun 2003
Posts: 56
G
Babel fish
Offline
Babel fish
G
Joined: Jun 2003
Posts: 56
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
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
but use Linux smile


My ally is the compiler, and a powerful ally it is!
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
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!

Link Copied to Clipboard