Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 620 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 620 Bytes

unibot-safe-eval

Safe eval plugin for UniBot. This is done because unibot-eval isn't safe to use in real world. This plugin uses sandbox for actual code runner.

Install

To your UniBot application

npm install git://github.com/UniBot/unibot-safe-eval --save

And after that register new plugin on IRC channels what you need

plugin [#channel] safe-eval

ps. remember to restart your UnitBot.

Usage

Below is couple of examples of usage.

~~2+2
~~Math.random()
~~(function(name) { return 'hello, ' + name; })('foobar')