mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 08:37:24 +01:00 
			
		
		
		
	pbot-vm: Add newline to output only if output does not already have a newline
This commit is contained in:
		
							parent
							
								
									3375580a2d
								
							
						
					
					
						commit
						690c5f5c44
					
				@ -116,7 +116,10 @@ sub process_command($command, $mod, $user, $tag) {
 | 
			
		||||
 | 
			
		||||
        print STDERR "=" x 40, "\n";
 | 
			
		||||
 | 
			
		||||
        return "$result\n";
 | 
			
		||||
        # ensure output is newline-terminated
 | 
			
		||||
        $result .= "\n" unless $result =~ /\n$/;
 | 
			
		||||
 | 
			
		||||
        return $result;
 | 
			
		||||
    } else {
 | 
			
		||||
        # wait for child to finish
 | 
			
		||||
        waitpid($pid, 0);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user