지하철IRC스크립트

alias xsubway { sockclose xsubway | sockopen xsubway www.websubway.co.kr 80 } 
alias xsubx_disp {
  if ( %xsubx.시간 == $null ) { /set %xsubx.에러 4다수의 노선을 이용하여 검색할수 없습니다. }
  if ( %xsubx.시간 != $null ) { /set %xsubx.에러 1없습니다. }
  msg %xsubx.chan 1[12지하철 검색 완료!1]2───────────────
  msg %xsubx.chan 1[12출발역 : $+ %start.station $+ 1] 2- 1[12 도착역 : $+ %lost.station $+ 1]
  msg %xsubx.chan 2*총 소요시간 :1 $+ %xsubx.시간 2*총 정차역 :1 $+ %xsubx.역수
  if ( %xsubx.구간 !isin 1 ) {
    msg %xsubx.chan 2*노선 :1  %xsubx.구간 $+ 개 노선이용 2*비고 : %xsubx.에러
  }
  msg %xsubx.chan 2*노선도 보기 :1 http://images.websubway.co.kr/imgSubway/seoul/line.gif
  ;;msg %xsubx.chan 2─────────────────────────────2Made By Kunny
  /unset %start.station %lost.station %xsubx.* 

}



<!-- 명령어 부분 -->

on 1:input:#: {
  if (($1 == !지하철)) && (($2)) && (($3)) {
    if (( $2 == $null ) || ( $3 == $null )) { /msg $chan [4Error1]다음의 형식대로 써주세요 !지하철 [출발역] [도착역] 역자를 빼고 입력하세요 | halt }
    say $1-
    say $mini 4…─[1지하철 검색 스크립4]2 = $2
    set %start.station $2
    set %lost.station $3
    set %xsubx.chan $chan
    xsubway
    halt
  }
}

<!-- 소켓 오픈 -->

on *:sockopen:xsubway: { 
  if ($sockerr) { echo -a 10소켓열기3▶ 4접속에러입니다. | return } 
  sockwrite -n $sockname GET /subway/default.asp?city=seoul&vurl=shortest.asp&start= $+ %start.station $+ &dest= $+ %lost.station $+ &sel_type=shortest&x=24&y=11 HTTP/1.0 
  sockwrite -n $sockname Host: www.websubway.co.kr 
  sockwrite -n $sockname Connection: close 
  sockwrite -n $sockname $crlf 
} 

<!-- 소켓읽기 -->

on *:sockread:xsubway: { 
  sockread %temp 
  if ( <td align="center" colspan=" isin %temp ) { 
    set %nPos1 $pos(%temp,<td align="center" colspan=",1)
    set %nPos2 $pos(%temp,">,1)
    set %temp $mid(%temp, %nPos1, %nPos2)
    set %temp $remove(%temp,<td align="center" colspan=)
    set %temp $remove(%temp,">)
    set %temp $remove(%temp,")
    set %xsubx.구간 %temp
    ;    set %xsubx.구간 %temp  
  }
  else if ( ">■ <b>총 소요시간 : isin %temp ) {
    set %nPos1 $pos(%temp, ■,1)
    set %nPos2 $pos(%temp, </b></td>,1)
    set %temp $mid(%temp, %nPos1, %nPos2)
    set %temp $remove(%temp, </b></td>)
    set %temp $remove(%temp, ■ <b>총 소요시간 :)
    set %xsubx.시간 %temp
  }
  else if ( ">■ <b>총 정차역 : isin %temp ) {
    set %nPos1 $pos(%temp, ■,1)
    set %nPos2 $pos(%temp, </b></td>,1)
    set %temp $mid(%temp, %nPos1, %nPos2)
    set %temp $remove(%temp, </b></td>)
    set %temp $remove(%temp, ■ <b>총 정차역 :)
    set %xsubx.역수 %temp
  }
  else if (</HTML> isin %temp) { 
    sockclose $sockname | xsubx_disp | unset %temp | 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 2006-05-11 13:52:08
Processing time 0.0587 sec