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.

http::geturl wackyness

Old posts that have not been replied to for several years.
Locked
d
dreness

Post by dreness »

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 :smile:

Thanks,
-dre
d
dreness

Post by dreness »

hmm.. I just had the fabulous idea of trying it on one of the several other bots I admin...

[dcc(netinfo)] .tcl package require http
11:04PM [netinfo(dcc)] Tcl: 2.0
[dcc(netinfo)] .tcl set token [http::geturl http://www.dreness.com/test.html]
11:05PM [netinfo(dcc)] Tcl: ::http::1
[dcc(netinfo)] .tcl http::data $token
11:05PM [netinfo(dcc)] Tcl: This is only a test :smile:

sure enough, problem with the other eggdrop.. hmm, maybe I'll just run the script elsewhere...

-dre
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

What version is the eggdrop.

I have a feeling the DNS module in 1.6 series of eggdrop will help cure this issue.
Locked