From 7e4ae2460a73b0c98d1d1ce9f9bf6a2c6567d1d3 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 26 May 2013 20:24:05 +0000 Subject: [PATCH] Automatic callback for ~ajs [#476] --- modules/js/js.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/js/js.js b/modules/js/js.js index d6094ff..023db38 100644 --- a/modules/js/js.js +++ b/modules/js/js.js @@ -21,6 +21,16 @@ var js = function(dbot) { // Run JS code un-sandboxed, with access to DBot memory (admin-only). '~ajs': function(event) { + var callback = function() { + var args = Array.prototype.slice.call(arguments); + for(var i=0;i