mirror of
				https://github.com/reality/dbot.git
				synced 2025-11-04 02:27:31 +01:00 
			
		
		
		
	Merge pull request #312 from JohnMaguire2013/master
remove trailing/leading whitespace on link titles, add link to default modules [Close #305]
This commit is contained in:
		
						commit
						689400081b
					
				@ -13,7 +13,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    "admins": [ "batman" ],
 | 
			
		||||
    "moderators": [ "whatever" ],
 | 
			
		||||
    "moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "stats", "users" ],
 | 
			
		||||
    "moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "stats", "users", "link" ],
 | 
			
		||||
    "language": "en",
 | 
			
		||||
    "debugMode": true,
 | 
			
		||||
    "version": "Depressionbot IRC bot 0.4-dev - Lovingly crafted by The DepressionBot Foundation (a charity arm of the Official Aberystwyth Open Source International Development League)."
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ var link = function(dbot) {
 | 
			
		||||
                body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
 | 
			
		||||
                var title = body.valMatch(/<title>(.*)<\/title>/, 2);
 | 
			
		||||
                if(title && title.length < 140) {
 | 
			
		||||
                    event.reply(ent.decode(title[1]));
 | 
			
		||||
                    event.reply(ent.decode(title[1]).trim());
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user