We need to edit/test all the plugins, found here: https://github.com/SomeKittens/bot-plugins
Plugins are in this form:
(function() {
// ...plugin
})();
Switch that to this:
module.exports = function(bot, IO) {
// ...plugin
};
We'll need to manually call this in bot.js
(it's near the bottom, it'll be replaced after all the plugins are fixed).
require('../bot-plugins/$PLUGIN_NAME')(bot, IO);
and that's it!
...unless it's not. I think I've changed all the JSONP and xhr, but those should be changed to IO.request
.
In addition, define
and unonebox
need to be rewritten with jsdom
, stat
returns Unicode for some reason, converter
and roomPermissions
need testing, substitution
needs some way of tracking chat history and many other things that will eventually crop up.
The
eval
module should have some special consideration. What do we use instead of WebWorker? Can we have something that will not crash the node process, similarly to how the current implementation does?I guess using the
vm
module is the way to go, but will the "Too much recursion" errors and the likes crash the process?