mirror of
				https://github.com/reality/dbot.git
				synced 2025-10-31 20:17:42 +01:00 
			
		
		
		
	no karma from bot (quote abuse)
This commit is contained in:
		
							parent
							
								
									cdc8cb0d74
								
							
						
					
					
						commit
						baeeee64d9
					
				| @ -98,7 +98,7 @@ var karma = function(dbot) { | ||||
| 
 | ||||
|     this.listener = function(event) { | ||||
|         var match = event.message.match(/^(.+)(\+\+|\-\-)$/); | ||||
|         if(match && match[1].length < 25) { | ||||
|         if(event.user !== dbot.config.name && match && match[1].length < 25) { | ||||
|             match[1] = match[1].replace(/(\+|\-)/g,'').replace(/:/g,'').trim(); | ||||
|             if(_.has(this.lastKarma, event.rUser.id) && this.lastKarma[event.rUser.id] + 5000 > Date.now()) { | ||||
|                 return event.reply('Try again in a few seconds : - )'); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 reality
						reality