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.

Remotely hosted eggdrop.conf

General support and discussion of Eggdrop bots.
Post Reply
D
DeFirence
Voice
Posts: 8
Joined: Tue Oct 31, 2006 2:58 am

Remotely hosted eggdrop.conf

Post by DeFirence »

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

eggdrop.conf resides within the same folder as eggdrop on the same box.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
D
DeFirence
Voice
Posts: 8
Joined: Tue Oct 31, 2006 2:58 am

Post by DeFirence »

Alchera wrote:eggdrop.conf resides within the same folder as eggdrop on the same box.
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..

DeFirence
GT-Radio Staff
http://www.gt-radio.co.za
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

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..
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?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

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:

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
Have you ever read "The Manual"?
Post Reply