Fix responding to privmsgs in eval

configuration-in-hiera
Robert Gerus 2015-04-16 12:17:22 +02:00
parent 711b7adfbc
commit 06b011f715
1 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,11 @@ include EventMachine::IRC::Commands
Client.register_trigger("PRIVMSG", "eval") { |msg|
message = msg[:params][1]
destination = msg[:params][0]
destination = if msg[:params][0] == Config.lookup("client::nick", "repost", msg[:scope]) then
msg[:prefix].split("!").first
else
msg[:params][0]
end
if message[0..5] == ":eval " then
if Config.lookup("eval::owners", [], msg[:scope]).include?(msg[:scope][:person]) then