summaryrefslogtreecommitdiff
path: root/data/rbot/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r--data/rbot/plugins/script.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb
index e3e718a7..762613d4 100644
--- a/data/rbot/plugins/script.rb
+++ b/data/rbot/plugins/script.rb
@@ -52,6 +52,9 @@ class ScriptPlugin < Plugin
name = m.message.split.first
if m.address? and @commands.has_key?( name )
+ auth_path = "script::run::#{name}".intern
+ return unless @bot.auth.allow?(auth_path, m.source, m.replyto)
+
code = @commands[name].code.dup.untaint
# Convenience variables, can be accessed by scripts:
@@ -172,6 +175,7 @@ plugin = ScriptPlugin.new
plugin.default_auth( 'edit', false )
plugin.default_auth( 'eval', false )
plugin.default_auth( 'echo', false )
+plugin.default_auth( 'run', true )
plugin.map 'script add -f :name *code', :action => 'handle_add_force', :auth_path => 'edit'
plugin.map 'script add :name *code', :action => 'handle_add', :auth_path => 'edit'