plugins/js_sandbox.rb
def execute(message, query)
    
    # if the query parameter was sent in
    if query
      puts "######## Raw query = #{query}"
      query = quote(query)
      puts "######## #{query} #######"
      cmd = %Q{node plugins/js_sandbox/js_sandbox.js "#{query}"}
      puts "######## #{cmd} ########"
      result = `#{cmd}`
      message.reply(result.chop)
    end
   
  end
# include the Cinch::Plugin mixin which 
# adds the behavior for plugins to this plain Ruby object.
include the Cinch::Plugin mixin which
adds the behavior for plugins to this plain Ruby object.
include the Cinch :: Plugin mixin which adds the behavior for plugins to this plain Ruby object .
def execute(message, query)
    if query
      puts "######## Raw query = #{query}"
      query = quote(query)
      puts "######## #{query} #######"
      cmd = %Q{node plugins/js_sandbox/js_sandbox.js "#{query}"}
      puts "######## #{cmd} ########"
      result = `#{cmd}`
      message.reply(result.chop)
    end
  end
def execute ( message , query ) if query puts "######## Raw query = #{query}" query = quote ( query ) puts "######## #{query} #######" cmd = %Q{node plugins/js_sandbox/js_sandbox.js "#{query}"} puts "######## #{cmd} ########" result = ` #{ cmd } ` message . reply ( result . chop ) end end
include the Cinch::Plugin mixin which
adds the behavior for plugins to this plain Ruby object.
include the Cinch :: Plugin mixin which adds the behavior for plugins to this plain Ruby object .
# if the query parameter was sent in
message
query