To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
MSDN Subscribers: Download the VS 2010 Release Candidate
MSDN Subscribers: Download the VS 2010 Release Candidate
Sell Your Code and Make Money?
Creating your own Tetris game using VB.NET
Article :: Improving Software Economics, Part 4 of 7: Top 10 Principles of Iterative Software Management



Go Back   VBForums > VBForums CodeBank > CodeBank - Visual Basic 6 and earlier

Reply Post New Thread
 
Thread Tools Search this Thread Display Modes
Old Apr 2nd, 2002, 11:12 AM   #1
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
IRC Bot Source Code

[ edit 15/08/2006 ]
Please see here:
http://www.vbforums.com/showthread.php?p=2583859
[ /edit ]

[ edit 23/01/2007 ]
Please see here:
http://plenderj.com/files/IRCBot.1.0.6.zip
[/edit]

Here is the source code to a IRC Bot I've been coding over the past few days.
It can get onto IRC, send and receive files via DCC, reply to CTCP queries, join channels, give people +o or +v if supplied with the right password ...

It should also be very easy to modify the source code to add your own features etc.

As always, if you've any queries or comments just contact me.
Attached Files
File Type: zip irc bot.zip (6.8 KB, 5252 views)

Last edited by plenderj; Jan 22nd, 2007 at 08:29 PM.
plenderj is offline   Reply With Quote
Old Oct 21st, 2004, 09:47 AM   #2
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
* 21-October-2004 - Moved to CodeBank *
plenderj is offline   Reply With Quote
Old Jul 2nd, 2005, 11:51 PM   #3
TRIBAL-PHoENiX
New Member
 
Join Date: Jul 05
Posts: 1
TRIBAL-PHoENiX is an unknown quantity at this point (<10)
Re: IRC Bot Source Code

hey i tryed running your bot and well it doesnt work for me, i ran it with the default config and i got this error "Run-Time Error '40020': Invalid operation at current state, then i changed the config file with this
=================================
set nickname = testbot
set altnick = bot2
set connectToIRC = true
set dccPass = password
set quitMessage = Mwaaahhhhhhhhhhh
set attemptedCPS = 4096

Servers {
2600net:6667
}

InitiallySend {
JOIN #testing1
OPER admin password
}
===============================
and still get the same error
TRIBAL-PHoENiX is offline   Reply With Quote
Old Jul 3rd, 2005, 06:45 AM   #4
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

Well bear in mind the code is based on the IRC protocol of over 3 years ago - I don't know if much has changed in the meantime...
plenderj is offline   Reply With Quote
Old Jul 3rd, 2005, 07:21 AM   #5
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

Its a No Route To Host error. By the looks of it there is no IRC Server running on the host 2600.net
plenderj is offline   Reply With Quote
Old Jul 11th, 2006, 10:32 AM   #6
scope-of-dread
New Member
 
Join Date: Jul 06
Posts: 2
scope-of-dread is an unknown quantity at this point (<10)
Re: IRC Bot Source Code

Just thought id see how your bot worked in 2006 july - well it works fine still logs in joins channel no problems at all. IRC hasnt really changed much at all in years, and is unlikely to change much in the future, some new parts are added but overall its still the same base.
scope-of-dread is offline   Reply With Quote
Old Jul 11th, 2006, 10:46 AM   #7
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

Thanks The source code is actually hacked down to a generic enough form from an IRC bot project I created to do some pretty specific stuff online. There's some parts of the code that don't really make sense or aren't applicable...

... come to think of it I should probably write a vb.net version of it...
plenderj is offline   Reply With Quote
Old Aug 8th, 2006, 09:32 AM   #8
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

By the way I'm coding a brand new bot from scratch in VB.NET
plenderj is offline   Reply With Quote
Old Aug 15th, 2006, 05:36 AM   #9
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

http://www.vbforums.com/showthread.php?p=2583859
plenderj is offline   Reply With Quote
Old Jan 22nd, 2007, 01:20 PM   #10
CyberInfantry
Member
 
Join Date: Jan 07
Location: Riverton, WY
Posts: 36
CyberInfantry is an unknown quantity at this point (<10)
Re: IRC Bot Source Code

I'm checking out this bot and running it through step by step. I think I understand what it's doing, but not quite why/how.

Also, I'm trying to get it to where it picks up one what people say in the main room, run some calculations based on the input, and spit it back out.

I want this to occur in the main room, not in a private message.

I'm trying to figure out the sckServer.DataArrival part; I think that is the key for what I am looking for.

Basically, I'm wanting it to work so that the following happens:

<Joe_Schmoe> !roll 5
Bot catches "Joe_Schmoe", the "!roll" command, and "5". Bot creates 5 random numbers within a pre-determined range and sends back the following to the room for all to see:

<Bot_Test> <Joe_Schmoe> rolled 5 dice: #, #, #, #, #.


Really all I'm needing help on is figuring out how to catch the input and send the output.


Thanks!

Last edited by CyberInfantry; Jan 22nd, 2007 at 01:47 PM.
CyberInfantry is offline   Reply With Quote
Old Jan 22nd, 2007, 08:21 PM   #11
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

You should really look at the new versions:
http://plenderj.com/files/
plenderj is offline   Reply With Quote
Old Jan 22nd, 2007, 09:23 PM   #12
CyberInfantry
Member
 
Join Date: Jan 07
Location: Riverton, WY
Posts: 36
CyberInfantry is an unknown quantity at this point (<10)
Re: IRC Bot Source Code

It appears that is in .NET? Am I wrong?

While I have an academic version of .NET, I've never learned it... I don't know how different it is from VB 6.0, but 6.0 (Well, and Java) is the only thing I've worked with. :/
CyberInfantry is offline   Reply With Quote
Old Jan 23rd, 2007, 05:56 AM   #13
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

Very similar for the most part to VB6 actually
plenderj is offline   Reply With Quote
Old Jan 23rd, 2007, 06:16 AM   #14
plenderj
Banned
 
plenderj's Avatar
 
Join Date: Jan 01
Location: Dublin, Ireland
Posts: 10,359
plenderj  is on a distinguished road (40+)
Re: IRC Bot Source Code

Looking at your other posts, if you used my VB.NET version you could modify this part in Core/BotCore.vb

Code:
                        Select Case objMessages(i).Command
                            Case "376"
                                Config.LiveInformation.IRCConnected = True

                            Case "PRIVMSG"
                                If objMessages(i).Request.StartsWith(":DCC CHAT") Then
                                    Dim myDCCRequest As New DCCRequest(objMessages(i).Request)
                                    If myDCCRequest.IsValid Then
                                        CreateNewDCCConnection(myDCCRequest)
                                    End If
                                End If
                        End Select
And put in a Case Else statement and look for the !roll command etc
plenderj is offline   Reply With Quote
Old Jan 23rd, 2007, 09:56 PM   #15
CyberInfantry
Member
 
Join Date: Jan 07
Location: Riverton, WY
Posts: 36
CyberInfantry is an unknown quantity at this point (<10)
Re: IRC Bot Source Code

I think I've gotten the code from the VB 6.0 one pretty much figured out. It can do all the commands that I want it to do now (for now).

Excellent program.
CyberInfantry is offline   Reply With Quote
Old Sep 8th, 2009, 04:56 PM   #16
mustiback
Junior Member
 
Join Date: Sep 08
Posts: 16
mustiback is an unknown quantity at this point (<10)
Re: IRC Bot Source Code

ThanKs!!!
mustiback is offline   Reply With Quote
Old Dec 10th, 2009, 04:29 AM   #17
SNIPER.PS
New Member
 
Join Date: Dec 09
Posts: 12
SNIPER.PS is an unknown quantity at this point (<10)
Arrow Re: IRC Bot Source Code

thank you very much
SNIPER.PS is offline   Reply With Quote
Reply

Go Back   VBForums > VBForums CodeBank > CodeBank - Visual Basic 6 and earlier


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:25 AM.




To view more projects, click here

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.