mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 00:27:23 +01:00 
			
		
		
		
	MessageHistory: recall special characters can now be escaped
				
					
				
			This commit is contained in:
		
							parent
							
								
									68ed2e7580
								
							
						
					
					
						commit
						49d92aa1bd
					
				@ -1125,8 +1125,8 @@ sub recall_message_by_text {
 | 
			
		||||
    my ($self, $id, $channel, $text, $ignore_command, $use_aliases) = @_;
 | 
			
		||||
 | 
			
		||||
    my $search = "%$text%";
 | 
			
		||||
    $search =~ s/\*/%/g;
 | 
			
		||||
    $search =~ s/\?/_/g;
 | 
			
		||||
    $search =~ s/(?<!\\)\.?\*/%/g;
 | 
			
		||||
    $search =~ s/(?<!\\)\?/_/g;
 | 
			
		||||
 | 
			
		||||
    my $messages = eval {
 | 
			
		||||
        my $sql = 'SELECT * FROM Messages WHERE channel = ? AND msg LIKE ? ESCAPE "\" ';
 | 
			
		||||
 | 
			
		||||
@ -25,8 +25,8 @@ use PBot::Imports;
 | 
			
		||||
# These are set by the /misc/update_version script
 | 
			
		||||
use constant {
 | 
			
		||||
    BUILD_NAME     => "PBot",
 | 
			
		||||
    BUILD_REVISION => 4355,
 | 
			
		||||
    BUILD_DATE     => "2021-08-15",
 | 
			
		||||
    BUILD_REVISION => 4358,
 | 
			
		||||
    BUILD_DATE     => "2021-08-19",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
sub initialize {}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user