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.

A question about config code

Old posts that have not been replied to for several years.
Locked
G
GQsm
Voice
Posts: 16
Joined: Wed Sep 26, 2001 8:00 pm
Location: Sheffield, England
Contact:

Post by GQsm »

I got some eggdrops. In the configs a lot of settings I keep the same throughout my botnet, while some oviously have to be unique. Is it possible to have a file i call global.conf to contain my global lines of the config which i can put with each bot and then a unique bot.conf only containing the non-global settings.

could it work when i do a ./eggdrop bot.conf
that contains some code to load the remaining settings from global.conf

Would this work and what commands/lines of code do I need to put in the bot.conf to load global.conf?

Thanks

_________________


<font size=-1>[ This Message was edited by: GQsm on 2001-09-27 21:53 ]</font>
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Sure that will work. In bot.conf, just add the line:

source global.conf
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Yes, this can work.

I orginaly used this method for my servers list, but eventualy converted it into 4 files. Servers, global settings, dynamic settings and bot settings.

I took all the setting that would remain the same, and put them in global.inc.

I took the server list and put it in a file called servers.inc

I took settings like, userfile, chanfile, notefile, logfiles, and put them in a file called dynamic.inc. This file is actualy a script, which adds the bot nickname to the filenames, thus making them unique, but keeping config size down.

I then created a file called botnick.conf. This contained the botnick, nickname, any scripts that where only on one bot and so on.

TO make these all work together, I used the "source" tcl command to load the dynamic.inc file, into the bots config file. In turn, the dynamicinc file, has a "source" line for both servers.inc and global.inc.

This makes them all come together.

For a more basic example.

File: server.inc

Code: Select all

set servers {
irc.my.server
irc.not.my.server
}
File: global.inc

Code: Select all

listen 3333 all
source server.inc
source alltools.tcl
File: botnick.inc

Code: Select all

set nick "botnick"
source global.inc
G
GQsm
Voice
Posts: 16
Joined: Wed Sep 26, 2001 8:00 pm
Location: Sheffield, England
Contact:

Post by GQsm »

Thanks guys you were really quick!

I shall now attack my configs with my new found knowledge.

Thanks again :wink:
Locked