Lo all,
How can i set up eggdrop on a server and have the eggdrop.conf file hosted on a different server?
Thanks in advanced.
DeFirence
GT-Radio Staff
http://www.gt-radio.co.za
Is there no way that i can put it in a remote location, because i cannot be given access the the server where the bot gets run from, but i need to update the eggdrop.conf regularly..Alchera wrote:eggdrop.conf resides within the same folder as eggdrop on the same box.
maybe you can have the administrator allow you to use the .set and .tcl commands.... but why in the world would you need to update the conf file so much anyways?DeFirence wrote:Is there no way that i can put it in a remote location, because i cannot be given access the the server where the bot gets run from, but i need to update the eggdrop.conf regularly..
Try this:DeFirence wrote:Is there no way that i can put it in a remote location, because i cannot be given access the the server where the bot gets run from, but i need to update the eggdrop.conf regularly.
Code: Select all
# eggdrop.conf:
package require http 2.3
proc rsource {url args} {
set d [list -async 0 ns [uplevel 1 {namespace current}]]
array set o [concat $d $args]
if {$o(-async)} {
http::geturl $url -command [list rsource $url ns $o(ns) tok]
} elseif {[info exists o(tok)]} {
upvar #0 $o(tok) s
} else {
upvar #0 [http::geturl $url] s
}
if {[info exists s]} {
if {$s(status)=="ok"&&[lindex [split $s(http)] 1]=="200"} {
set code [list namespace eval $o(ns) $s(body)]
if {[catch {uplevel #0 $code} r]} {
putlog "rsource error ($url): $r"
} else {
putlog "rsource done: $url"
}
} else {
putlog "rsource http error: $url"
}
unset s
}
}
rsource http://some.tld/remote.conf