Add an "access denied" message

master
Robert Gerus 2014-03-25 07:24:54 +01:00
parent 838f03a574
commit d9a16c788e
1 changed files with 5 additions and 2 deletions

View File

@ -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
}