summaryrefslogtreecommitdiffstats
path: root/plugins/eval.rb
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/eval.rb')
-rw-r--r--plugins/eval.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/eval.rb b/plugins/eval.rb
index 4282f76..cfe2163 100644
--- a/plugins/eval.rb
+++ b/plugins/eval.rb
@@ -1,9 +1,10 @@
include EventMachine::IRC::Commands
Client.register_trigger("PRIVMSG") { |msg|
+ message = msg[:params][1]
+ destination = msg[:params][0]
+
if Config[:eval][:owners].include?(msg[:prefix]) then
- message = msg[:params][1]
- destination = msg[:params][0]
if message[0..5] == ":eval " then
code = message[6..-1]
begin
@@ -18,5 +19,7 @@ Client.register_trigger("PRIVMSG") { |msg|
puts e.backtrace
end
end
+ else
+ Client.privmsg(destination, Config[:eval][:denied])
end
}