eggheads / eggdrop

The Eggdrop IRC Bot
GNU General Public License v2.0
510 stars 84 forks source link

Compress module tethering with share module #401

Open ghost opened 7 years ago

ghost commented 7 years ago

Sharing module isn't loaded; compress is (I want to use the COMPRESSFILE/UNCOMPRESSFILE commands. but not userfile share!):

SHARE MODULE

loadmodule share

set allow-resync 0

set resync-time 900

set private-global 1

set private-globals nmtolv

set private-user 1

set override-bots 0

COMPRESS MODULE

loadmodule compress

Apparently, COMPRESS has a dependency ([MODULES] compress 1.2 {share 2.3} {eggdrop 108.0}). This means that SHARE is subsequently loaded (which I don't want the memory footprint / overhead, thus, not loaded!!).

This means: to use commands like COMPRESSFILE / UNCOMPRESSFILE, I have to load the SHARE module? I know it's auto-loading (I don't want it) because:

\ Module unloaded: compress \ Sending 'share end' to all sharebots... \ Unloaded sharing module, flushing tbuf's... \ Module unloaded: share \ Unloading transfer module, killing all transfer connections...

Is the SHARE module really necessary to use COMPRESS for the COMPRESSFILE/UNCOMPRESSFILE options? If so, shouldn't the following also be true:

(1) TCL-COMMANDS.DOC (which is a TEXT file, not a DOC file) should show the module dependencies: "YOU MUST LOAD THE SHARE MODULE TO USE THESE COMPRESS MODULE COMMANDS!!"

[or]

(2) the modules should COMPLAIN via PUTLOG when a dependancy is missing, let you decide what to you about it (sacrifice the option of using COMPRESSFILE/UNCOMPRESSFILE)

[or]

(3) CONFIG variable setting: $::autoload-depencies (if 0, fatal-error the bot; if 1, auto-load dependency modules as needed)

Pixelz commented 6 years ago

Still relevant

ghost commented 6 years ago

This issue is moot now, because of the ZLIB option in TCL 8.6.

However, for those on older TCL versions, it's still helpful to use COMPRESSFILE without having to load the share module (and thus, increase memory footprint). Is this possible?