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!
Red_Rooste5
Voice
Posts: 37 Joined: Sat Oct 21, 2006 7:43 am
Post
by Red_Rooste5 » Thu Oct 26, 2006 2:12 pm
i'm having some problems with this script:
Code: Select all
bind pub - @rsnews rsnew:proc
proc rsnew:rsnews {nick uhost hand chan text} {
set site "http://www.slushpuppy.silverinterlocution.org/parsers/rsnews.php"
set token [::http::geturl $site]
set content [::http::data $token]
::http::cleanup $content
}
regexp {<br>(.*?)</br>} $content - rsnews
putserv "PRIVMSG $chan :[RSNEWS] $rsnews"
}
}
What's wrong with it?
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Thu Oct 26, 2006 3:20 pm
You tell us.
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Thu Oct 26, 2006 9:14 pm
Well, one mistake I see is you want to use ::http::cleanup on the page, not the content, so it should say
::http::cleanup $token
But I don't think cleanup would clobber the $content variable, but maybe it does..
As far as your regexp, I don't think "-" will work as a variablename, so change it to something else, like
regexp {<br>(.*?)</br>} $content match rsnews
"match" is the entire string that matched, and $rsnews is the part that was within () (but you seem to know that already =)
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Oct 27, 2006 9:02 am
You got 1 (one) opened '{' and 3 (three) closed '}' while you should have just 1 (one) pair of them. Fix that first, and then browse tough the forum and find some of the topics related to this.
Once the game is over, the king and the pawn go back in the same box.