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
 | 
					  def loop
 | 
				
			||||||
    while line = s.gets
 | 
					    while line = s.gets
 | 
				
			||||||
      msg = Message.new line
 | 
					      msg = Message.new line
 | 
				
			||||||
      puts "S: #{msg.raw}"
 | 
					 | 
				
			||||||
      @hooks.each{|h| h.call(msg)}
 | 
					      @hooks.each{|h| h.call(msg)}
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
@ -119,7 +118,7 @@ i.hook do |msg|
 | 
				
			|||||||
  cmd, args = content.split(' ', 2)  
 | 
					  cmd, args = content.split(' ', 2)  
 | 
				
			||||||
  cmd = "#{cmds_dir}/#{cmd}"
 | 
					  cmd = "#{cmds_dir}/#{cmd}"
 | 
				
			||||||
  args ||= ''
 | 
					  args ||= ''
 | 
				
			||||||
  next unless File.exists? cmd
 | 
					  next unless File.exist? cmd
 | 
				
			||||||
  if not File.executable? cmd
 | 
					  if not File.executable? cmd
 | 
				
			||||||
    i.privmsg target, "#{cmd} isn't executable. try chmod +x"
 | 
					    i.privmsg target, "#{cmd} isn't executable. try chmod +x"
 | 
				
			||||||
    next
 | 
					    next
 | 
				
			||||||
 | 
				
			|||||||
@ -12,4 +12,5 @@ OUR_CMDS_DIR=${OUR_CMDS_DIR:-/town/our}
 | 
				
			|||||||
  --tmpfs /tmp \
 | 
					  --tmpfs /tmp \
 | 
				
			||||||
  --unshare-pid \
 | 
					  --unshare-pid \
 | 
				
			||||||
  --die-with-parent \
 | 
					  --die-with-parent \
 | 
				
			||||||
 | 
					  --uid 0 --gid 0 \
 | 
				
			||||||
  "$@"
 | 
					  "$@"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user