1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IRC Help

Discussion in 'HTML, Graphics & Programming' started by Walkerie, 3 Aug 2006.

  1. Walkerie


    Joined: 17 Mar 2005

    Posts: 3,967

    Location: Home

    I need a bot that can do this

    !Find <file>
    bot returns Bot> I found file on www.something.com\file.exe

    I dont want a google bot i want it to search a default site that i can set.

    Ive looked through loads of guides and other sites just baffels me could anyone help ?
  2. Longbow


    Joined: 15 Jan 2004

    Posts: 9,490

    You want a whole bot or a script?

    In eggdrop which uses TCL I used to following:

    package require http
    set agent "Mozilla/4.75 (X11; U; Linux 2.2.17; i586; Nav)"
    bind pub - !search public:search
    proc public:search {nick host hand chan text} {
    	global agent all
    	set url "http://www.something.com/search.php?=[lindex $text 0]"
    	set http [::http::config -useragent $agent]    
    	set http [::http::geturl $url]
    	set html [::http::data $http]
    	regsub -all "\n" $html "" html
    	regsub -all "members and" $html "" html
    	regexp {<b>(.*?)</b>} $html - all
    	putserv "PRIVMSG $chan :$active"
    I haven't coded tcl in a while, but that should work, providing you have the search page. The first result would be inbetween the <b> tags.

    But you need to supply a bit more information on what you need :)
  3. Walkerie


    Joined: 17 Mar 2005

    Posts: 3,967

    Location: Home

    i just want to have a seperate iRC running with the bot on im guessing i just need the full script so that itll all work.
  4. Insanity

    Wise Guy

    Joined: 5 Jun 2005

    Posts: 1,747

    Location: Tasmania (Australia)

    You'll need a socket bot for that.

    Head over to mircscripts.org and ask for some help in their forums, or check the download section, there might be one there.

    I'd write you a bot, but i suck with everything socket related. :(