IRC Help

Soldato
Joined
17 Mar 2005
Posts
4,042
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 ?
 
You want a whole bot or a script?

In eggdrop which uses TCL I used to following:

Code:
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 :)
 
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.
 
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. :(
 
Back
Top Bottom