irc/script/weather

iconvircirc/이모티콘irc/botservirc/chanserv irc/script/weather


출처 : 인터넷
on 1:input:*: {
  if ($1 == !날씨) {
    if ($2 != $null) { 
      msg $chan $1-
      .set %날씨.체크 $2
      .set %날씨.chan $chan
      sockclose 날씨체크
      sockopen 날씨체크 search.naver.com 80
      halt 
    }
    msg $chan $1-
    say ※검색가능지역 : 서울/경기/충남/대전/청북/청주/서해5도/백령/영서/춘천/영동/강릉/울릉/독도/전남/광주/전북/전주/경남/부산/경북/대구/제주
    halt
  }
}
on *:sockopen:날씨체크:sockwrite -nt $sockname GET http://search.naver.com/search.naver?where=nexearch&query= $+ %날씨.체크 $+ +날씨&frm=t1
on *:sockread:날씨체크: {
  sockread %we.tmp
  if (기온 isin %we.tmp) { 
      .set %we.on on | write weahter_tmp.txt $remove($gettok($replace(%we.tmp,<tr><td colspan=2 style='padding:8 0 0 20;'><span class='gray01'>,|),2,124),</span>,</td>,</tr>,기온 :) 
  }
  if (강수 isin %we.tmp) { 
      write weahter_tmp.txt $remove($gettok($replace(%we.tmp,<tr><td colspan=2 style='padding:5 0 5 20;'><span class='gray01'>,|),2,124),</span>,</td></tr>,강수 :) 
  }
  if (<td class='ln15'> isin %we.tmp) { 
      write weahter_tmp.txt $remove($gettok($replace(%we.tmp,<td class='ln15'>,|),2,124),</td>) 
  }
}

on *:sockclose:날씨체크: {
  if (%we.on == on) {
    msg %날씨.chan 4 %날씨.체크 1의 날씨 정보 입니다. 
    msg %날씨.chan 10[1오늘10] 1 $+ $read(weahter_tmp.txt,1) 7[1기온7] 1 $+ $read(weather_tmp.txt,2) 4[1강수4] 1 $+ $read(weather_tmp.txt,3) 
    msg %날씨.chan 10[1내일10] 1 $+ $read(weahter_tmp.txt,4) 7[1기온7] 1 $+ $read(weather_tmp.txt,5) 4[1강수4] 1 $+ $read(weather_tmp.txt,6)
    msg %날씨.chan 10[1모레10] 1 $+ $read(weahter_tmp.txt,7) 7[1기온7] 1 $+ $read(weather_tmp.txt,8) 4[1강수4] 1 $+ $read(weather_tmp.txt,9)
    /.remove weahter_tmp.txt
    unset %we.*
    halt 
  }
  if (%we.on == off) || ($file(weahter_tmp.txt).size == 0) {
    msg %날씨.chan 13(1Error13) 해당 지역의 정보가 없습니다.
    halt
  }
  else { 
      msg %날씨.chan 13(1Error13) 해당 지역의 정보가 없습니다. 
  }
  /.remove weahter_tmp.txt
  unset %we.*
  halt
} 

ID
Password
Join





- 전 이런 놈입니다.

격언> 세상이 자신에게 준 것보다 더 많이 세상에 되돌려 주는것, 그것이 바로 성공이다. (헨리포드)

Recent Changes

D  Echoes Of War(The... @ 2012-05-18 [03:44 pm] by windlesszone
D  Diablo3 @ 2012-05-15 [04:49 pm] by windlesszone
D  Diablo3/story/wizard @ 2012-05-15 [04:48 pm] by windlesszone 4 changes
D  Diablo3/story/wit... @ 2012-05-15 [04:16 pm] by windlesszone
D  Diablo3/story/monk @ 2012-05-15 [04:14 pm] by windlesszone





Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2007-02-27 15:23:45
Processing time 0.0376 sec