mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 00:27:23 +01:00 
			
		
		
		
	Plugins/Plang: die() with newline to prevent line number info from being added
This commit is contained in:
		
							parent
							
								
									f5c7ff1c9a
								
							
						
					
					
						commit
						7c5e649a87
					
				@ -168,7 +168,7 @@ sub plang_builtin_factget {
 | 
			
		||||
sub plang_builtin_factset {
 | 
			
		||||
    my ($self, $plang, $context, $name, $arguments) = @_;
 | 
			
		||||
    my ($channel, $keyword, $text) = ($arguments->[0]->[1], $arguments->[1]->[1], $arguments->[2]->[1]);
 | 
			
		||||
    die "Factoid $channel.$keyword is locked. Cannot set." if $self->is_locked($channel, $keyword);
 | 
			
		||||
    die "Factoid $channel.$keyword is locked. Cannot set.\n" if $self->is_locked($channel, $keyword);
 | 
			
		||||
    $self->{pbot}->{factoids}->add_factoid('text', $channel, 'Plang', $keyword, $text);
 | 
			
		||||
    return [['TYPE', 'String'], $text];
 | 
			
		||||
}
 | 
			
		||||
@ -176,7 +176,7 @@ sub plang_builtin_factset {
 | 
			
		||||
sub plang_builtin_factappend {
 | 
			
		||||
    my ($self, $plang, $context, $name, $arguments) = @_;
 | 
			
		||||
    my ($channel, $keyword, $text) = ($arguments->[0]->[1], $arguments->[1]->[1], $arguments->[2]->[1]);
 | 
			
		||||
    die "Factoid $channel.$keyword is locked. Cannot append." if $self->is_locked($channel, $keyword);
 | 
			
		||||
    die "Factoid $channel.$keyword is locked. Cannot append.\n" if $self->is_locked($channel, $keyword);
 | 
			
		||||
    my $action = $self->{pbot}->{factoids}->get_meta($channel, $keyword, 'action');
 | 
			
		||||
    $action = "" if not defined $action;
 | 
			
		||||
    $action .= $text;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user