Advertisement
Shiny_

Untitled

May 25th, 2014
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.18 KB | None | 0 0
  1. EVAL_REGEX = /\Aeval (?<query>.*)\z/i
  2.  
  3. on :message, EVAL_REGEX do |m|
  4.     if m.user.to_s.downcase == ADMIN.downcase
  5.         query = EVAL_REGEX.match(m.message)[:query]
  6.         eval(query)
  7.     end
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement