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 

rss synd tinyurl code optimization

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
teegg
Voice


Joined: 04 Apr 2012
Posts: 7

PostPosted: Fri Apr 13, 2012 2:55 pm    Post subject: rss synd tinyurl code optimization Reply with quote

I am running rss synd 5b1 with tinyurl mod and am getting constant ping timeouts.

Originally I didn't think it was script related so i made the following post.
http://forum.egghelp.org/viewtopic.php?t=18920

but now I noticed the following:
[14:44] (!) timer drift -- spun 3 minutes

I think its due to the tinyurl code I added. Because before that, rss synd worked just fine and i had no ping timeouts. Also, some of the time, the tinyurl does show up when the rss is announced. SO i have two issues, my eggdrop tiems out and sometimes the tiny url does not produce anything.

Here is the tinyurl code I have:
Code:
#tinyurl expansion for rss-synd.tcl
#@see http://forum.egghelp.org/viewtopic.php?p=66327#66327
proc ::rss-synd::tinyurl {url} {
  #tinyurls are currently 26 chars at most
  if {[string length $url] <= 26} { return $url; }
  set tinyurl "http://tinyurl.com/api-create.php";
  set query [::http::formatQuery "url" $url];
  # since this connection is synchronous and blocks
  #  the timeout should be relatively small.
  set token [::http::geturl "$tinyurl?$query" -timeout 5000];
  set url [::http::data $token];
  ::http::cleanup $token;
  return $url;
}


So obviously there is a timeout I can edit. But my question is, do I need to increase or decrease the timeout. And also, why is this a problem, is the tinyurl.com service slow? Should I use a different one?
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 Support & Releases 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