I'm having trouble getting http::geturl to fetch pages from within eggdrop. I can execute the following commands from the tclsh shell with no problem:
package require http
set token [http::geturl http://www.apple.com]
http::data $token
... and it dumps the data from the url just like it should.
This doesn't seem to work from within a script, and I can't even do it from within the eggdrop console itself. Here's me in dcc chat with the bot:
[dcc(xunder)] .tcl package require http
[xunder(dcc)] Tcl: 2.3
[dcc(xunder)] .tcl set token [::http::geturl http://www.apple.com]
[xunder(dcc)] TCL error: couldn't open socket: host is unreachable
No matter what hostname I try, the same error is returned... I've tried straight ip addresses, I've even tried localhost (there is a local web server), but no love. My system stats are as follows:
eggdrop 1.4.5 running on darwin 1.3.7 (mac os x server 10.0), using TCL 8.3.
I tend to think it's a problem with eggdrop itself, since tcl has no problem fetching the data itself from tclsh using http::geturl. Anybody have any suggestions on what the problem / solution is?
I guess I'll try another version of eggdrop tomorrow... just wanted to drop this here tonight to make sure I'm not doing anything wrong... I looked at a bunch of example code and my best guess is that this version of eggdrop is partially broken in mac os x server 10.0
Thanks,
-dre