Compare commits
	
		
			2 Commits
		
	
	
		
			09993218c6
			...
			0f775e150d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					0f775e150d | ||
| 
						 | 
					f60561d470 | 
							
								
								
									
										3
									
								
								our.rb
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								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
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										19
									
								
								wrap_it.sh
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								wrap_it.sh
									
									
									
									
									
								
							@ -4,12 +4,13 @@ DIR=$(dirname -- $0)
 | 
			
		||||
OUR_CMDS_DIR=${OUR_CMDS_DIR:-/town/our}
 | 
			
		||||
 | 
			
		||||
/usr/bin/bwrap \
 | 
			
		||||
	--unshare-all \
 | 
			
		||||
	--ro-bind / / \
 | 
			
		||||
	--bind "$OUR_CMDS_DIR/data" "$OUR_CMDS_DIR/data" \
 | 
			
		||||
	--share-net \
 | 
			
		||||
	--dev /dev \
 | 
			
		||||
	--tmpfs /tmp \
 | 
			
		||||
	--unshare-pid \
 | 
			
		||||
	--die-with-parent \
 | 
			
		||||
	"$@"
 | 
			
		||||
  --unshare-all \
 | 
			
		||||
  --ro-bind / / \
 | 
			
		||||
  --bind "$OUR_CMDS_DIR/data" "$OUR_CMDS_DIR/data" \
 | 
			
		||||
  --share-net \
 | 
			
		||||
  --dev /dev \
 | 
			
		||||
  --tmpfs /tmp \
 | 
			
		||||
  --unshare-pid \
 | 
			
		||||
  --die-with-parent \
 | 
			
		||||
  --uid 0 --gid 0 \
 | 
			
		||||
  "$@"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user