-
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?
-
-
Take a look at my signature, there's an open source bot in there :)
-
i already did, i edited the bot.conf file to join the server and channel i'm on, but never did..
-
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
-
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?
-
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
-
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..
-
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
-
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..
-
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
-
what i meant was that nothing comes up on neather listbox1 and 2..
-
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
-
nevermind, i got the bouncer working.. :)