mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 08:37:24 +01:00 
			
		
		
		
	Add factoid > nick redirection (only for factoids, not for commands)
				
					
				
			This commit is contained in:
		
							parent
							
								
									5eb5e2e6ce
								
							
						
					
					
						commit
						27bb3bab95
					
				@ -1094,6 +1094,17 @@ sub interpreter {
 | 
			
		||||
 | 
			
		||||
    $context->{arguments} = "" if not defined $context->{arguments};
 | 
			
		||||
 | 
			
		||||
    # factoid > nick redirection
 | 
			
		||||
    if ($context->{arguments} =~ s/> ([_a-zA-Z0-9\[\]{}`\\-]+)$//) {
 | 
			
		||||
        my $rcpt = $1;
 | 
			
		||||
        if ($self->{pbot}->{nicklist}->is_present($context->{from}, $rcpt)) {
 | 
			
		||||
            $context->{nickoverride} = $rcpt;
 | 
			
		||||
            $context->{force_nickoverride} = 1;
 | 
			
		||||
        } else {
 | 
			
		||||
            $context->{arguments} .= "> $rcpt";
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # if no match found, attempt to call factoid from another channel if it exists there
 | 
			
		||||
    if (not defined $keyword) {
 | 
			
		||||
        my $string = "$original_keyword $context->{arguments}";
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user