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.

eggdrop to an url

Old posts that have not been replied to for several years.
Locked
B
BVGorp

eggdrop to an url

Post by BVGorp »

bind pub - !info pub_info

proc pub_info { nick uhost hand chan args } {
putlog "stage 1"
http::geturl http://url.to.a.page/mysqlbot.php?action=stats&user=[lindex $args 0]
putlog "stage 1"
}

when ya type !info bvgorp teh eggdrop should go to the url
the web page handles the rest

but the bottimes out and reconnects again afer 5 mins or so

plz help the bot should only go to that url and wait for a responce for 2 or 3 secs then close the socket
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

You need a catch or maybe a timer to time the connection out and spit an error if the bot can't connect to the site after so long. The bot reconnecting is due to tcl not being threaded I believe.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Also, you might need to be using POST instead of GET..

Code: Select all

http::geturl -query action=stats&user=[lindex $args 0]
FYI, you probably shouldn't use 'args' as a variable name.

Wcc
Locked