summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2014-03-25 07:24:54 +0100
committerRobert Gerus <arachnist@i.am-a.cat>2014-03-25 07:24:54 +0100
commitd9a16c788ee10f8ae81f028771eac4f310269b4b (patch)
tree6d1b789a96173b055348bfaf55679d983be93281
parent838f03a574530b3e7c9e35d618bc41f78a826a34 (diff)
downloadrepost-d9a16c788ee10f8ae81f028771eac4f310269b4b.tar.gz
repost-d9a16c788ee10f8ae81f028771eac4f310269b4b.tar.bz2
repost-d9a16c788ee10f8ae81f028771eac4f310269b4b.tar.xz
repost-d9a16c788ee10f8ae81f028771eac4f310269b4b.zip
Add an "access denied" message
-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
}