Skip to content

Instantly share code, notes, and snippets.

@baudehlo
Created April 16, 2012 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save baudehlo/2399723 to your computer and use it in GitHub Desktop.
Save baudehlo/2399723 to your computer and use it in GitHub Desktop.
diff --git a/plugins.js b/plugins.js
index 5fe8904..3053790 100644
--- a/plugins.js
+++ b/plugins.js
@@ -9,6 +9,7 @@ var vm = require('vm');
var fs = require('fs');
var utils = require('./utils');
var util = require('util');
+var server = require('./server');
var plugin_paths = [path.join(__dirname, './plugins')];
if (process.env.HARAKA) { plugin_paths.unshift(path.join(process.env.HARAKA, 'plugins')); }
@@ -128,6 +129,7 @@ plugins._load_and_compile_plugin = function(name) {
process: process,
Buffer: Buffer,
Math: Math,
+ server: server,
};
constants.import(sandbox);
try {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment