mirror of
				https://github.com/reality/dbot.git
				synced 2025-11-04 13:37:32 +01:00 
			
		
		
		
	read title even when over multiple lines
This commit is contained in:
		
							parent
							
								
									181c3a2628
								
							
						
					
					
						commit
						e5a9142384
					
				@ -20,6 +20,7 @@ var link = function(dbot) {
 | 
			
		||||
 | 
			
		||||
            request(link, function (error, response, body) {
 | 
			
		||||
                if(!error && response.statusCode == 200) {
 | 
			
		||||
                    body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
 | 
			
		||||
                    var title = body.valMatch(/<title>(.*)<\/title>/, 2);
 | 
			
		||||
                    if(title) {
 | 
			
		||||
                        event.reply(title[1]);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user