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.

Load multiple conf files?

Old posts that have not been replied to for several years.
Locked
s
scr0llwheel
Voice
Posts: 17
Joined: Fri Jan 03, 2003 12:37 am

Load multiple conf files?

Post by scr0llwheel »

Currently, I have 4 bots running on the same machine. They use their own conf files but the conf files are all exactly the same (except for the 4 changes I had to make in each one to change the name of each bot and it's user file, etc.). Is there a way to instead have a master eggdrop.conf file that is loaded for each bot and then I would have a small conf file specifically for each bot that just has the settings for it's name, etc. This would allow me to easily change .conf file settings in just one file -- not 4. Is there something like an include command? Or maybe it could be done through a script? How about editing the actual source files?

Basically, I want 2 conf files loaded for each bot -- the master one and the small one (with the name settings).

Any help/ideas/suggestions would be appreciated.
Thanks,
scr0llwheel
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The config file, is infact a Tcl script in itself, in it's simplest form.

The source command is provided by Tcl, and serves the same purposeas "include".

As such, you can have you 4 line config file, then append a simple source line, to load the rest of the repeated stuff.

I use this method for my bots.

I use 4 files for each bot.

1: Contains the server list, so It's dead simple to edit one file.

2: Is the static settings

3: Is the per bot settings like IP, host, nickname botnickname and so on

4: Is a dynamic file. It's a small script, desined to make the userfile, channels and notes filenames, out of the information provided, and converting nasty charcters into ones that can be used for filenames.
Locked