egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need "sockets" help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Red_Rooste5
Voice


Joined: 21 Oct 2006
Posts: 37

PostPosted: Thu Oct 26, 2006 2:12 pm    Post subject: Need "sockets" help Reply with quote

i'm having some problems with this script:
Code:
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?
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Thu Oct 26, 2006 3:20 pm    Post subject: Reply with quote

You tell us.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Oct 26, 2006 9:14 pm    Post subject: Reply with quote

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 =)
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Oct 27, 2006 9:02 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber