IRC Bot
Posted: Sun Jun 01, 2008 4:45 pm
Well, I am working on an irc bot.
I have this so far.
COuld someone help me just do a simple command, Ping / Pong. Because this times out everytime it connects.
Thank you.
Also, just on a side note. In the console it says its connected, then times out.
Yet the bot is not actually joined the channel.
Thanks to anyone that can help me.
Need-Help:
Ping / Pong.
I have this so far.
Code: Select all
OpenConsole()
If InitNetwork() = 0
PrintN("Error, Can't initialize the network.")
EndIf
Port = 6667
ConnectionID = OpenNetworkConnection("irc.raw-net.com", Port)
If ConnectionID
Nick$ = "nwBot"
Channel$ = "#rawnet"
Databuffer.s=""
DataBufferLength.w=1024
SendNetworkString(ConnectionID, "NICK"+Nick$+Chr(13)+Chr(10))
SendNetworkString(ConnectionID, "USER blah 8 * : blah"+Chr(13)+Chr(10))
SendNetworkString(ConnectionID, "JOIN"+Channel$+Chr(13)+Chr(10))
While 1
If NetworkClientEvent(ConnectionID)=2
Result = ReceiveNetworkData(ConnectionID, @DataBuffer, DataBufferLength)
PrintN(Databuffer)
EndIf
Wend
EndIf
End
Thank you.
Also, just on a side note. In the console it says its connected, then times out.
Yet the bot is not actually joined the channel.
Thanks to anyone that can help me.
Need-Help:
Ping / Pong.