mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 00:47:21 +01:00 
			
		
		
		
	stats: route permission error replies to notice and not privmsg
This prevents "unknown command" flood loops with stats services which poll these on link.
This commit is contained in:
		
							parent
							
								
									57f77c676d
								
							
						
					
					
						commit
						c49147f232
					
				@ -87,7 +87,8 @@ def handle_stats(irc, source, command, args):
 | 
			
		||||
    try:
 | 
			
		||||
        permissions.check_permissions(irc, source, perms)
 | 
			
		||||
    except utils.NotAuthorizedError as e:
 | 
			
		||||
        irc.msg(source, 'Error: %s' % e)  # Note, no irc.error() because this is not a command, but a handler
 | 
			
		||||
        # Note, no irc.error() because this is not a command, but a handler
 | 
			
		||||
        irc.msg(source, 'Error: %s' % e, notice=True)
 | 
			
		||||
        return
 | 
			
		||||
 | 
			
		||||
    log.info('(%s) /STATS %s requested by %s', irc.name, stats_type, irc.get_hostmask(source))
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user