mIRC Home    About    Download    Register    News    Help

Print Thread
C
cmad
cmad
C
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.
D
DekuHaze
DekuHaze
D
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: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
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".

C
cmad
cmad
C
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

C
cmad
cmad
C
I just had a look at the eggdrop source code... I must wish me luck!!! crazy crazy

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
We wish you, too laugh

C
cmad
cmad
C
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

G
Gamersad
Gamersad
G
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.

C
cmad
cmad
C
but use Linux smile

C
cmad
cmad
C
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


Link Copied to Clipboard