1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
# referer-antibot.rb $Revision: 1.2 $
#
# νBOTˤϡΥפʤ褦ˤ
# ˤꡢ̵طʸǥ뤳Ȥ(ͽۤ)
# pluginǥ쥯ȥư
#
# ץ:
# @options['bot']
# åȤˤBOTUser-Agentɲä
# ̵["googlebot", "Hatena Antenna", "moget@goo.ne.jp"]Τߡ
#
# ʤdisp_referrer.rbץ饰ˤƱεǽޤޤƤΤǡ
# disp_referrerƳѤߤξˤɬפϤʤ
#
# ---------
#
# This plugin hide Today's Link to search engin's robots.
# It may reduce nose marked by robots.
#
# disp_referrer.rb plugin has already this function. You don't
# need install this plugin with disp_referrer.rb.
#
# Options:
# @options['bot']
# An array of User-Agent of search engine's robots.
# Default setting is ["googlebot", "Hatena Antenna", "moget@goo.ne.jp"].
#
# Copyright (C) 2002 MUTOH Masao <mutoh@highway.ne.jp>
# Modified by TADA Tadashi <sho@spc.gr.jp>
# You can redistribute it and/or modify it under GPL2.
#
# short referer
alias referer_of_today_short_antibot_backup referer_of_today_short
def referer_of_today_short( diary, limit )
return '' if bot?
referer_of_today_short_antibot_backup( diary, limit )
end
# long referer
alias referer_of_today_long_antibot_backup referer_of_today_long
def referer_of_today_long( diary, limit )
return '' if bot?
referer_of_today_long_antibot_backup( diary, limit )
end
|