I run a botnet of 3 eggdrops, and on one of them (only noticed this on one so far). I get errors like:
[07:00] ERROR writing user file.
[07:04] Tcl error [onjoin_out]: couldn't open "Balthamos.#chat-world": too many open files
(4 minute difference there).
Not sure about it being a tcl error considering the user file error. If it starts getting these errors, it wont accept dcc or telnet connections either for the same reason (too many open files).
It is returning without closing the file first... as such you should
add in a "close $onmsg" before the return statement.
You should contact the author of the script, and if the script is a file in the egghelp.org database, you may want to consider contacting slennox as well.