
    i\                     $    d Z ddlZdddddZd Zy)	z!Compatibility with older versions    Nz/limiter: config section 'real_ip' is deprecatedz?real_ip.x_for has been replaced by botdetection.trusted_proxieszAreal_ip.ipv4_prefix has been replaced by botdetection.ipv4_prefixzBreal_ip.ipv6_prefix has been replaced by botdetection.ipv6_prefix')real_ipzreal_ip.x_forreal_ip.ipv4_prefixreal_ip.ipv6_prefixc                 0   t         t        |      ddd}t        j                         D ]\  \  }}	 | j	                  |      }t        j                  |fi | |dk(  r| j                  d|       |dk(  sK| j                  d|       ^ y # t
        $ r Y kw xY w)Nr   zsearx.limiter)categoryfilenamelinenomoduler   zbotdetection.ipv4_prefixr   zbotdetection.ipv6_prefix)	DeprecationWarningstrLIMITER_CFG_DEPRECATEDitemsgetKeyErrorwarningswarn_explicitset)cfgcfg_filekwargsoptmsgvals         /root/searxng/searx/compat.pylimiter_fix_cfgr      s     'M!	F +002 
5S	''#,C 	s-f-''GG.4''GG.4
5  		s   B			BB)__doc__r   r   r        r   <module>r      s'    '  AV^_	 5r   