Yes it can be made
But the script works with a single database so if you add something it will have the same database on all channel where the script is activated.
at every proc (only the second line) you want to work only if +explain is set on the channel
You could take a look at this script http://forum.egghelp.org/viewtopic.php?t=19313 it works exactly as learn.tcl but it can have database for every channel and it can be activated/deactivated
Yes does two lines of code can work on any other tcl that doesnt have a 'chanset' but you have to change 'explain' to whatever else. Anyway as i said your explain script will have the same database on every channel so the part with enable/disable the script on a specified channel is only for disableing the commands.