diff --git a/our.rb b/our.rb index c26a4df..ad02438 100755 --- a/our.rb +++ b/our.rb @@ -78,7 +78,6 @@ class User def loop while line = s.gets msg = Message.new line - puts "S: #{msg.raw}" @hooks.each{|h| h.call(msg)} end end @@ -119,7 +118,7 @@ i.hook do |msg| cmd, args = content.split(' ', 2) cmd = "#{cmds_dir}/#{cmd}" args ||= '' - next unless File.exists? cmd + next unless File.exist? cmd if not File.executable? cmd i.privmsg target, "#{cmd} isn't executable. try chmod +x" next diff --git a/wrap_it.sh b/wrap_it.sh index 506bf56..76b1a8d 100755 --- a/wrap_it.sh +++ b/wrap_it.sh @@ -12,4 +12,5 @@ OUR_CMDS_DIR=${OUR_CMDS_DIR:-/town/our} --tmpfs /tmp \ --unshare-pid \ --die-with-parent \ + --uid 0 --gid 0 \ "$@"