|
-
Apr 8th, 2002, 10:52 PM
#1
Thread Starter
Lively Member
Irc Bot
I'm trying to make a bot that will respont to command like !opme !voice and all those kind of command, but i got no idea how to be able to connect to a server..
I did that program from the winsock tutorial 2 and added an input box, but after connecting to the server, i get timeout after like 1 min or so, which i'm guessing is cause that where the irclient is suppose to send data.. but that the problem, i dont know which kind of data i'm suppose to send, can anyone help?
-
Apr 9th, 2002, 04:19 AM
#2
Thread Starter
Lively Member
-
Apr 9th, 2002, 05:08 AM
#3
Retired VBF Adm1nistrator
Take a look at my signature, there's an open source bot in there
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Apr 9th, 2002, 06:03 AM
#4
Thread Starter
Lively Member
i already did, i edited the bot.conf file to join the server and channel i'm on, but never did..
-
Apr 9th, 2002, 06:06 AM
#5
Retired VBF Adm1nistrator
Can you post the conf file ?
Also, look in modMisc.bas
Set doDebug to True, and it will Debug.Print all incoming winsock data. that should indicate whats wrong
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Apr 9th, 2002, 06:15 AM
#6
Thread Starter
Lively Member
hmm, it joins efnet servers without a problem, but when trying to join something like wondernet, it stops on the ident msg.. probally cause they use diff commands?
-
Apr 9th, 2002, 06:24 AM
#7
Retired VBF Adm1nistrator
Interesting.
I've seen that problem before.
What I suggest you do is write a bouncer, then connect through it with mIRC to the server and see how it does it
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Apr 9th, 2002, 06:27 AM
#8
Thread Starter
Lively Member
bouncer? is that something like a packet sniffer? cause i tried spynet and it crashed my pc to a blue screen of death.... on winxp!! very strange..
-
Apr 9th, 2002, 06:34 AM
#9
Retired VBF Adm1nistrator
code the boucner yourself.
if you search for posts by me that have the word bouncer in them you should see source code for one and an explanation
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Apr 9th, 2002, 06:46 AM
#10
Thread Starter
Lively Member
got the bouncer, i added the 2 winsock control and 2 listbox.. is there anything else i should change/add? btw, nothing happended when i ran it..
-
Apr 9th, 2002, 06:53 AM
#11
Retired VBF Adm1nistrator
nothing is supposed to happen when you run it.
you set the listen and connect out port accordingly, so 6667 or whatever in this case.
in the bouncer set the remote host for the outbound connection to the hostname of the irc server
then use mirc to connect to your own machine, and the bouncer will bounce the connect to the irc server.
you can then see all data that passes between
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Apr 9th, 2002, 06:54 AM
#12
Thread Starter
Lively Member
what i meant was that nothing comes up on neather listbox1 and 2..
-
Apr 9th, 2002, 07:16 AM
#13
Thread Starter
Lively Member
i dont get the code..
Code:
Private Sub Form_Load()
With Winsock1
.LocalPort = 6667
.Listen
'if i try putting anything under .listen, i get an error..
End With
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID
Winsock2.Connect "my ip?", 6667
'does my ip go up there or the irc server?
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strBuff As String
Winsock1.GetData strBuff, vbString
List1.AddItem "From Client : " & strBuff
Do Until Winsock2.State = sckConnected
DoEvents
Loop
Winsock2.SendData strBuff
End Sub
Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
Dim strBuff As String
Winsock2.GetData strBuff, vbString
List2.AddItem "From Server : " & strBuff
Winsock1.SendData strBuff
End Sub
-
Apr 9th, 2002, 07:19 AM
#14
Thread Starter
Lively Member
nevermind, i got the bouncer working..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|