set url "$ip:$port/admin.cgi?mode=viewxml"
set djtrigger "!dj"
set ip "lynxfm.com"
set port "9004"
set pass "whatever"
set channel "#botchan"
if {![info exists egghttp(version)]} {
putlog "egghttp.tcl was NOT successfully loaded."
putlog "shoutcast.tcl has not been loaded as a result."
} else {
proc current_dj {sock} {
global channel
set headers [egghttp:headers $sock]
set body [egghttp:data $sock]
regexp { <SERVERTITLE>(.*)</SERVERTITLE> } $body - dj
putquick "PRIVMSG $channel :\0032The current DJ is: \0034 $dj"
}
bind pub -|* $djtrigger top:djtrigger
proc top:djtrigger {nick host hand chan text} {
global url
set sock [egghttp:geturl $url current_dj]
return 1
}
}
But.. I dont know how to log into the page to parse the onfo I need so not even sure if the
set url "whatitsaysupthere"
will work with the
set ip "bleah"
set port "bleahsomemore"
as you can see i have... set pass "whatever"
But how can I get egghttp use that in the http login form with also the username admin.
I have looked through the egghttp docs but dont see anything that tells you about login forms.
then maybe your routing table is improper? Just beeing it your server doesnt exclude the reason of failure to be an iptables/ipchain setting... or simply refered as "firewall and routing rules". All you can do is making sure that the IP it tries to connect is valid. Try to set debug code to show you to what it actually tries to connect and verify it can connect to it outside of the bot, because only then it would be an issue with eggdrop ^.^.
Maybe socket binds to the wrong interface(s), try using the -myaddr option.