mirror of
				https://github.com/reality/dbot.git
				synced 2025-10-31 21:47:32 +01:00 
			
		
		
		
	and they told me no bru regex is cool u wil hav fun
This commit is contained in:
		
							parent
							
								
									12db5c64e9
								
							
						
					
					
						commit
						76382a6daa
					
				| @ -14,14 +14,14 @@ var api = function(dbot) { | ||||
|                 // this is retarded
 | ||||
|                 user = user.toLowerCase(); | ||||
|                 var resolvedUser = _.find(knownUsers.users, function(nick) { | ||||
|                     var toMatch = new RegExp("/"+user+"/i").compile(); | ||||
|                     return nick.match(toMatch);  | ||||
|                     var toMatch = new RegExp(user, "i"); | ||||
|                     return nick.match(toMatch) !== null;  | ||||
|                 }, this); | ||||
| 
 | ||||
|                 if(!resolvedUser) { | ||||
|                     resolvedUser = _.find(knownUsers.aliases, function(nick, alias) { | ||||
|                         var toMatch = new RegExp("/"+user+"/i").compile(); | ||||
|                         return alias.match(toMatch); | ||||
|                         var toMatch = new RegExp(user, "i"); | ||||
|                         return alias.match(toMatch) !== null; | ||||
|                     }, this); | ||||
|                     user = knownUsers.aliases[resolvedUser]; | ||||
|                 } else { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 reality
						reality