This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
kerum
Voice
Posts: 8 Joined: Fri Jan 11, 2013 10:06 am
Post
by kerum » Fri Jan 11, 2013 10:10 am
Hello everyone. I need a script for eggdrop that will let me make eggdrop go to a website and retrieve the text from it.
The website is a simple PHP script that echoes only one line of text. Now, I would like eggdrop to go there and write back that line of text in the IRC channel. It would look like this:
Thank you.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Jan 11, 2013 12:23 pm
Code: Select all
bind pub - !webreq my:webreq
proc my:webreq {nick uhost hand chan text} {
if {[scan $text {%s} url] != 1} {
puthelp "NOTICE $nick :Error, correct syntax is: !webreq <url>"
return
}
set token [::http::geturl $url]
set content [::http::data $token]
::http::cleanup $content
foreach line [split $content \n] {
puthelp "PRIVMSG $chan :$line"
}
}
Here's something simple that should do what you need.
Once the game is over, the king and the pawn go back in the same box.
kerum
Voice
Posts: 8 Joined: Fri Jan 11, 2013 10:06 am
Post
by kerum » Fri Jan 11, 2013 12:31 pm
Thanks. I'll test it now.
I'm a newbie to all this... I put that code into web.tcl, right?
EDIT: Thank you!!! It works perfectly
Thanks again!
Dominatez
Halfop
Posts: 50 Joined: Mon Jan 14, 2019 5:08 pm
Location: United Kingdom
Post
by Dominatez » Fri Aug 16, 2019 6:05 pm
Is there any chance you could get this working again Caeser ?