+++ /dev/null
-BEGIN{
-#set your paths here
-#and remember about doubleescaping!
-       
-       
-       tmppath=   "/eizm/tmp/ottmirror"
-       propath=   "/eizm/pro/ottmirror"
-       mempath=   "/eizm/mem/ottmirror"
-       logpath=   "/eizm/log/ottmirror"
-       mirrpath=  "/eizm/www/time/ott"
-       
-       wgetpath=  "/usr/bin/wget"
-       mawkpath=  "/usr/bin/mawk"
-       mvpath=    "/bin/mv"
-       rmpath=    "/bin/rm"
-       catpath=   "/bin/cat"
-       lspath=    "/bin/ls"
-       
-       useragent2="bothasar_t (http://1190.bicyclesonthemoon.info/ott/; Time thread mirror bot)"
-       useragent3="bothasar_p (http://1190.bicyclesonthemoon.info/ott/; Time thread post bot)"
-
-       ictaddr=   "http://forums.xkcd.com/viewforum.php?f=7"
-       ottaddr=   "http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start="
-       foraaddr=  "http://forums.xkcd.com"
-       waybaddr=  "http://web.archive.org/web/"
-       
-       threadID=         "101043"
-       links_regexp=     "href=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)\\/viewtopic\\.php"
-       prosilver_regexp= "((url.\\.)|(((href)|(src))=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/styles\\/prosilver"
-       prosilver_regexp2="((\\.)|(http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/styles\\/prosilver"
-       smiley_regexp=    "((url.\\.)|(((href)|(src))=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/images\\/smilies"
-       smiley_regexp2=   "((\\.)|(http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/images\\/smilies"
-       avatar_regexp=    "((src)|(href))=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)\\/download\\/file.php\\?avatar="
-       attachment_regexp="((src)|(href))=.http:\\/\\/(www\\.)?((for(ums3?|a)\\.xkcd\.com)|echochamber\\.me)\\/download\\/file.php\\?(mode=view\\&)?id="
-       own_image_regexp= "((1190.bicyclesonthemoon.(dnsd.)?info)|(1190-botm.dnsdynamic.com))\\/ott\\/image\\/"
-       own_url_encoded=  "http%3A%2F%2F1190.bicyclesonthemoon.info%2Fott"
-       bot3name_encoded= "bothasar_p"
-       default_subject=  "Re: 1190: \\"Time\\""
-       
-
-       #don't touch anything below this line
-       
-       USERAGENT2="#define USERAGENT \"" useragent2 "\""
-       USERAGENT3="#define USERAGENT \"" useragent3 "\""
-       USERAGENT2a="\tuseragent=\"\\\""useragent2 "\\\"\""
-       USERAGENT3a="\tuseragent=\"\\\""useragent3 "\\\"\""
-       ICT_ADDRESS="#define ICT_ADDRESS \"" ictaddr "\""
-       OTT_ADDRESS="#define OTT_ADDRESS \"" ottaddr "\""
-       FORA_ADDRESS="#define FORA_ADDRESS \"" foraaddr "\""
-       wayback ="\twayback=\"" waybaddr "\""
-       fora ="\tfora=\"" foraaddr "\""
-       
-       WGET_PATH="#define WGET_PATH \"" wgetpath "\""
-       MAWK_PATH="#define MAWK_PATH \"" mawkpath "\""
-       RM_PATH="#define RM_PATH \"" rmpath "\""
-       MV_PATH="#define MV_PATH \"" mvpath "\""
-       CAT_PATH="#define CAT_PATH \"" catpath "\""
-       LS_PATH="#define LS_PATH \"" lspath "\""
-       
-       LAST_PATH="#define LAST_PATH \"" mempath "/lasttime.\""
-       NAME_PATH="#define NAME_PATH \"" mempath "/name\""
-       LASTTIME_PATH="#define LASTTIME_PATH \"" mempath "/bot3last\""
-       POST_PATH3="#define POST_PATH \"" mempath "/mpost/\""
-       LIST_PATH3="#define LIST_PATH \"" mempath "/mlist/\""
-       LAST_PATH3="#define LAST_PATH \"" mempath "/mlist/last\""
-       OK_PATH3="#define OK_PATH \"" mempath "/mpost/ok/\""
-       PM_PATH3="#define PM_PATH \"" mempath "/mpost/pm/\""
-       FAIL_PATH3="#define FAIL_PATH \"" mempath "/mpost/fail/\""
-       POSTLIST_PATH3="#define POSTLIST_PATH \"" mempath "/mlist/\""
-       MPOST_PATH="#define MPOST_PATH \"" mempath "/mpost/\""
-       MLIST_PATH="#define MLIST_PATH \"" mempath "/mlist/\""
-       MLAST_PATH="#define MLAST_PATH \"" mempath "/mlist/last\""
-       MSTD_LAST_PATH="#define MSTD_LAST_PATH \"" mempath "/mlist/last\""
-       okpath="\tokpath=\"" mempath "/mpost/ok/\""
-       pmpath="\tpmpath=\"" mempath "/mpost/pm/\""
-       failpath="\tfailpath=\"" mempath "/mpost/fail/\""
-       mpostpath="\tmpostpath=\"" mempath "/mpost/\""
-       
-       LOG_PATH="#define LOG_PATH \"" logpath "/bot2.log.\""
-       LOG_PATH3="#define LOG_PATH \"" logpath "/bot3.log\""
-       
-       NP_PATH="#define NP_PATH \"" tmppath "/np.p0.\""
-       NP_PATH_1="#define NP_PATH_1 \"" tmppath "/np.p1.\""
-       NP_PATH_2="#define NP_PATH_2 \"" tmppath "/np.p2.\""
-       NP_PATH_3="#define NP_PATH_3 \"" tmppath "/np.p3.\""
-       STOP_PATH="#define STOP_PATH \"" tmppath "/fullstop.\""
-       TEMPFILE_PATH="#define TEMPFILE_PATH \"" tmppath "/bot3temp\""
-       POSTDATA_PATH="#define POSTDATA_PATH \"" tmppath "/bot3post\""
-       COOKIE_PATH="#define COOKIE_PATH \"" tmppath "/bot3cook\""
-       STOP_PATH3="#define STOP_PATH \"" tmppath "/bot3stop\""
-       TEMP_PATH3v="#define TEMP_PATH \"" tmppath "/mview.\""
-       TEMP_PATHp="#define TEMP_PATH \"" tmppath "/preview.\""
-       TEMP_PATHv="#define TEMP_PATH \"" tmppath "/view.\""
-       TEMP_PATHr="#define TEMP_PATH \"" tmppath "/posted.\""
-       TEMP_PATHm="#define TEMP_PATH \"" tmppath "/mpview.\""
-       
-       LIST_PATH="#define LIST_PATH \"" mirrpath "/postlist/\""
-       SIG_PATH="#define SIG_PATH \"" mirrpath "/sig/\""
-       INF_PATH="#define INF_PATH \"" mirrpath "/otterinf/\""
-       UP_PATH="#define UP_PATH \"" mirrpath "/np/\""
-       IND_PATH="#define IND_PATH \"" mirrpath "/ottfront\""
-       TOP_PATH="#define TOP_PATH \"" mirrpath "/top\""
-       END_PATH="#define END_PATH \"" mirrpath "/end\""
-       AV_PATH="#define AV_PATH \"" mirrpath "/avatar/\""
-       ATT_PATH="#define ATT_PATH \"" mirrpath "/attachment/\""
-       IMG_PATH="#define IMG_PATH \"" mirrpath "/image/\""
-       LAST_PAGE="#define LAST_PAGE \"" mirrpath "/np/last\""
-       IND_PATH3="#define IND_PATH \"" mirrpath "/mfront\""
-       POSTLIST_PATH="#define POSTLIST_PATH \"" mirrpath "/postlist/\""
-       OTTFRONT_PATH="#define OTTFRONT_PATH \"" mirrpath "/ottfront\""
-       MFRONT_PATH="#define MFRONT_PATH \"" mirrpath "/mfront\""
-       NP_TOP_PATH="#define NP_TOP_PATH \"" mirrpath "/np/top\""
-       NP_END_PATH="#define NP_END_PATH \"" mirrpath "/np/end\""
-       INFO_PATH="#define INFO_PATH \"" mirrpath "/info.htm\""
-       POST_PATH="#define POST_PATH \"" mirrpath "/post.htm\""
-       NP_LAST_PATH="#define NP_LAST_PATH \"" mirrpath "/np/last\""
-       SIG_PATHe="#define SIG_PATH \"sig=" mirrpath "/sig/\""
-       INF_PATHe="#define INF_PATH \"otterinf=" mirrpath "/otterinf/\""
-       
-       AWK_LATEST="#define AWK_LATEST \"" propath "/findlatest.awk\""
-       AWK_LIST="#define AWK_LIST \"" propath "/list.awk\""
-       AWK_BOT2="#define AWK_BOT2 \"" propath "/bot2.awk\""
-       AWK_UPLOAD="#define AWK_UPLOAD \"" propath "/upload.awk\""
-       AWK_INDEX="#define AWK_INDEX \"" propath "/index.awk\""
-       AWK_POST="#define AWK_POST \"" propath "/post.awk\""
-       AWK_PM="#define AWK_PM \"" propath "/pm.awk\""
-       AWK_VIEW="#define AWK_VIEW \"" propath "/view.awk\""
-       AWK_MVIEW="#define AWK_MVIEW \"" propath "/mview.awk\""
-       AWK_PREVIEW="#define AWK_PREVIEW \"" propath "/preview.awk\""
-       BOT_PATH="#define BOT_PATH \"" propath "/bot2\""
-       AWK_B2H="#define AWK_B2H \"" propath "/bb2html.awk\""
-       AWK_POSTED="#define AWK_POSTED \"" propath "/posted.awk\""
-       AWK_VERIFY="#define AWK_VERIFY \"" propath "/verify.awk\""
-       findpost_path="\tfindpost_path=\"" propath "/findpost\""
-       imgformat_path="\timgformat_path=\"" propath "/image\""
-
-};
-{
-       gsub(/\r/,"",$0)
-       if($1 ~ /^###USERAGENT2$/)
-       {
-               print USERAGENT2
-               next;
-       }
-       if($1 ~ /^###USERAGENT3$/)
-       {
-               print USERAGENT3
-               next
-       }
-       if($1 ~ /^###USERAGENT2$/)
-       {
-               print USERAGENT2
-               next;
-       }       
-       if($1 ~ /^###ICT_ADDRESS$/)
-       {
-               print ICT_ADDRESS
-               next
-       }
-       if($1 ~ /^###OTT_ADDRESS$/)
-       {
-               print OTT_ADDRESS
-               next
-       }
-       if($1 ~ /^###FORA_ADDRESS$/)
-       {
-               print FORA_ADDRESS
-               next
-       }
-       if($1 ~ /^###USERAGENT2a$/)
-       {
-               print USERAGENT2a
-               next;
-       }
-       if($1 ~ /^###USERAGENT3a$/)
-       {
-               print USERAGENT3a
-               next;
-       }
-       if($1 ~ /^###wayback$/)
-       {
-               print wayback
-               next;
-       }
-       if($1 ~ /^###fora$/)
-       {
-               print fora
-               next;
-       }
-       
-       
-       
-       if($1 ~ /^###WGET_PATH$/)
-       {
-               print WGET_PATH
-               next
-       }
-       if($1 ~ /^###MAWK_PATH$/)
-       {
-               print MAWK_PATH
-               next
-       }
-       if($1 ~ /^###RM_PATH$/)
-       {
-               print RM_PATH
-               next
-       }
-       if($1 ~ /^###MV_PATH$/)
-       {
-               print MV_PATH
-               next
-       }
-       if($1 ~ /^###CAT_PATH$/)
-       {
-               print CAT_PATH
-               next
-       }
-       if($1 ~ /^###LS_PATH$/)
-       {
-               print LS_PATH
-               next
-       }
-       
-       
-       
-       if($1 ~ /^###LAST_PATH$/)
-       {
-               print LAST_PATH
-               next
-       }
-       if($1 ~ /^###NAME_PATH$/)
-       {
-               print NAME_PATH
-               next
-       }
-       if($1 ~ /^###LASTTIME_PATH$/)
-       {
-               print LASTTIME_PATH
-               next
-       }
-       if($1 ~ /^###POST_PATH3$/)
-       {
-               print POST_PATH3
-               next
-       }
-       if($1 ~ /^###LIST_PATH3$/)
-       {
-               print LIST_PATH3
-               next
-       }
-       if($1 ~ /^###LAST_PATH3$/)
-       {
-               print LAST_PATH3
-               next
-       }
-       if($1 ~ /^###OK_PATH3$/)
-       {
-               print OK_PATH3
-               next
-       }
-       if($1 ~ /^###PM_PATH3$/)
-       {
-               print PM_PATH3
-               next
-       }
-       if($1 ~ /^###FAIL_PATH3$/)
-       {
-               print FAIL_PATH3
-               next
-       }
-       if($1 ~ /^###POSTLIST_PATH3$/)
-       {
-               print POSTLIST_PATH3
-               next
-       }
-       if($1 ~ /^###MPOST_PATH$/)
-       {
-               print MPOST_PATH
-               next
-       }
-       if($1 ~ /^###MLIST_PATH$/)
-       {
-               print MLIST_PATH
-               next
-       }
-       if($1 ~ /^###MLAST_PATH$/)
-       {
-               print MLAST_PATH
-               next
-       }
-       if($1 ~ /^###okpath$/)
-       {
-               print okpath
-               next
-       }
-       if($1 ~ /^###pmpath$/)
-       {
-               print pmpath
-               next
-       }
-       if($1 ~ /^###failpath$/)
-       {
-               print failpath
-               next
-       }
-       if($1 ~ /^###mpostpath$/)
-       {
-               print mpostpath
-               next
-       }
-       if($1 ~ /^###MSTD_LAST_PATH$/)
-       {
-               print MSTD_LAST_PATH
-               next
-       }
-       
-       
-       
-       if($1 ~ /^###LOG_PATH$/)
-       {
-               print LOG_PATH
-               next
-       }
-       if($1 ~ /^###LOG_PATH3$/)
-       {
-               print LOG_PATH3
-               next
-       }
-       
-       
-       
-       if($1 ~ /^###NP_PATH$/)
-       {
-               print NP_PATH
-               next
-       }
-       if($1 ~ /^###NP_PATH_1$/)
-       {
-               print NP_PATH_1
-               next
-       }
-       if($1 ~ /^###NP_PATH_2$/)
-       {
-               print NP_PATH_2
-               next
-       }
-       if($1 ~ /^###NP_PATH_3$/)
-       {
-               print NP_PATH_3
-               next
-       }
-       if($1 ~ /^###STOP_PATH$/)
-       {
-               print STOP_PATH
-               next
-       }
-       if($1 ~ /^###TEMPFILE_PATH$/)
-       {
-               print TEMPFILE_PATH
-               next
-       }
-       if($1 ~ /^###POSTDATA_PATH$/)
-       {
-               print POSTDATA_PATH
-               next
-       }
-       if($1 ~ /^###COOKIE_PATH$/)
-       {
-               print COOKIE_PATH
-               next
-       }
-       if($1 ~ /^###STOP_PATH3$/)
-       {
-               print STOP_PATH3
-               next
-       }
-       if($1 ~ /^###TEMP_PATH3v$/)
-       {
-               print TEMP_PATH3v
-               next
-       }
-       if($1 ~ /^###TEMP_PATHp$/)
-       {
-               print TEMP_PATHp
-               next
-       }
-       if($1 ~ /^###TEMP_PATHv$/)
-       {
-               print TEMP_PATHv
-               next
-       }
-       if($1 ~ /^###TEMP_PATHr$/)
-       {
-               print TEMP_PATHr
-               next
-       }
-       if($1 ~ /^###TEMP_PATHm$/)
-       {
-               print TEMP_PATHm
-               next
-       }
-       
-       
-       
-       if($1 ~ /^###LIST_PATH$/)
-       {
-               print LIST_PATH
-               next
-       }
-       if($1 ~ /^###SIG_PATH$/)
-       {
-               print SIG_PATH
-               next
-       }
-       if($1 ~ /^###INF_PATH$/)
-       {
-               print INF_PATH
-               next
-       }
-       if($1 ~ /^###UP_PATH$/)
-       {
-               print UP_PATH
-               next
-       }
-       if($1 ~ /^###IND_PATH$/)
-       {
-               print IND_PATH
-               next
-       }
-       if($1 ~ /^###TOP_PATH$/)
-       {
-               print TOP_PATH
-               next
-       }
-       if($1 ~ /^###END_PATH$/)
-       {
-               print END_PATH
-               next
-       }
-       if($1 ~ /^###AV_PATH$/)
-       {
-               print AV_PATH
-               next
-       }
-       if($1 ~ /^###ATT_PATH$/)
-       {
-               print ATT_PATH
-               next
-       }
-       if($1 ~ /^###IMG_PATH$/)
-       {
-               print IMG_PATH
-               next
-       }
-       if($1 ~ /^###LAST_PAGE$/)
-       {
-               print LAST_PAGE
-               next
-       }
-       if($1 ~ /^###IND_PATH3$/)
-       {
-               print IND_PATH3
-               next
-       }
-       if($1 ~ /^###POSTLIST_PATH$/)
-       {
-               print POSTLIST_PATH
-               next
-       }
-       if($1 ~ /^###OTTFRONT_PATH$/)
-       {
-               print OTTFRONT_PATH
-               next
-       }
-       if($1 ~ /^###MFRONT_PATH$/)
-       {
-               print MFRONT_PATH
-               next
-       }
-       if($1 ~ /^###NP_TOP_PATH$/)
-       {
-               print NP_TOP_PATH
-               next
-       }
-       if($1 ~ /^###NP_END_PATH$/)
-       {
-               print NP_END_PATH
-               next
-       }
-       if($1 ~ /^###INFO_PATH$/)
-       {
-               print INFO_PATH
-               next
-       }
-       if($1 ~ /^###POST_PATH$/)
-       {
-               print POST_PATH
-               next
-       }
-       if($1 ~ /^###NP_LAST_PATH$/)
-       {
-               print NP_LAST_PATH
-               next
-       }
-       if($1 ~ /^###SIG_PATHe$/)
-       {
-               print SIG_PATHe
-               next
-       }
-       if($1 ~ /^###INF_PATHe$/)
-       {
-               print INF_PATHe
-               next
-       }
-       
-       
-       
-       if($1 ~ /^###AWK_LATEST$/)
-       {
-               print AWK_LATEST
-               next
-       }
-       if($1 ~ /^###AWK_LIST$/)
-       {
-               print AWK_LIST
-               next
-       }
-       if($1 ~ /^###AWK_BOT2$/)
-       {
-               print AWK_BOT2
-               next
-       }
-       if($1 ~ /^###AWK_UPLOAD$/)
-       {
-               print AWK_UPLOAD
-               next
-       }
-       if($1 ~ /^###AWK_INDEX$/)
-       {
-               print AWK_INDEX
-               next
-       }
-       if($1 ~ /^###AWK_POST$/)
-       {
-               print AWK_POST
-               next
-       }
-       if($1 ~ /^###AWK_PM$/)
-       {
-               print AWK_PM
-               next
-       }
-       if($1 ~ /^###AWK_VIEW$/)
-       {
-               print AWK_VIEW
-               next
-       }
-       if($1 ~ /^###AWK_MVIEW$/)
-       {
-               print AWK_MVIEW
-               next
-       }
-       if($1 ~ /^###AWK_B2H$/)
-       {
-               print AWK_B2H
-               next
-       }
-       if($1 ~ /^###AWK_PREVIEW$/)
-       {
-               print AWK_PREVIEW
-               next
-       }
-       if($1 ~ /^###AWK_POSTED$/)
-       {
-               print AWK_POSTED
-               next
-       }
-       if($1 ~ /^###AWK_VERIFY$/)
-       {
-               print AWK_VERIFY
-               next
-       }
-       if($1 ~ /^###BOT_PATH$/)
-       {
-               print BOT_PATH
-               next
-       }
-       if($1 ~ /^###findpost_path$/)
-       {
-               print findpost_path
-               next
-       }
-       if($1 ~ /^###imgformat_path$/)
-       {
-               print imgformat_path
-               next
-       }
-       
-       if($0 ~ /###[^#;]*;/)
-       {
-               gsub(/###threadID;/,threadID,$0)
-               gsub(/###links_regexp;/,links_regexp,$0)
-               gsub(/###prosilver_regexp;/,prosilver_regexp,$0)
-               gsub(/###prosilver_regexp2;/,prosilver_regexp2,$0)
-               gsub(/###smiley_regexp;/,smiley_regexp,$0)
-               gsub(/###smiley_regexp2;/,smiley_regexp2,$0)
-               gsub(/###avatar_regexp;/,avatar_regexp,$0)
-               gsub(/###attachment_regexp;/,attachment_regexp,$0)
-               gsub(/###own_image_regexp;/,own_image_regexp,$0)
-               gsub(/###foraaddr;/,foraaddr,$0)
-               gsub(/###own_url_encoded;/,own_url_encoded,$0)
-               gsub(/###bot3name_encoded;/,bot3name_encoded,$0)
-               gsub(/###default_subject;/,default_subject,$0)
-               
-       }
-       
-       print $0
-};
\ No newline at end of file