Top

mIRC_Kamus


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  3.0 (of 1 scores)
Date Added  Nov 03, 2008
Last Updated  Nov 03, 2008
Tags  dict  dictionary  english  indonesia  indonesian  inggris  irc  kamus  mirc  wiki 

Introduction

This is a simple script to enable users in channel to translate English language to Indonesia language and the answer will send through notice.
Many thanks to :
- Google Search v1.93 by Meij <meijie@gmail.com>
- Sanjisan <sanjisan.wordpress.com>
- www.kamus.net

Grab the Code

;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;mIRC_Kamus
;By Sidik on irc.myquran.org #myquran
;Last updated: 20081031
;Thanks for Meij n Sanjisan
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
;Semua code ALIAS taruh di bawah ini 
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
alias socket.kamus {
  sockclose sockkamus
  sockopen sockkamus www.kamus.net 80
} 
 
alias nohtml {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
  return %x
} 
 
alias -l _encode {
  var %s, %p = $len($1-)
  while (%p) {
    if ($mid($1-,%p,1) isalnum) { %s = $+($ifmatch,%s) }
    else { %s = $+(%,$base($asc($mid($1-,%p,1)),10,16),%s) }
    dec %p
  }
  return %s
}
 
;Semua code ON taruh di bawah ini 
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
on *:text:!kamus *:#: {
  set %kamuschan $chan
  set %kamuscari $2-
  set %kamusnick $nick
  set %kamusno1 0
  set %kamusno2 No Results
  /socket.kamus
}
 
on *:sockopen:sockkamus:{
  tokenize 32 $sock($sockname).mark
  if ($sockerr) {
    echo -a [debuging] $sockname Unable to open connection
    echo -a [debuging] $sockname $1-
    sockclose $sockname
    return
  }
 
  ;echo -a [debuging] $+(/result.php?w=en-usa&q=,$_encode(%kamuscari),&submit=Search&e=0)
  sockwrite -nt $sockname GET $+(/result.php?w=en-usa&q=,$_encode(%kamuscari),&submit=Search&e=0) HTTP/1.0
  sockwrite -nt $sockname Accept-Language: en-usa
  sockwrite -nt $sockname User-Agent: mIRC_Kamus/Beta
  sockwrite -nt $sockname Referer: http://www.kamus.net
  sockwrite -nt $sockname Host: www.kamus.net
  sockwrite -nt $sockname Connection: close
  sockwrite -t $sockname $str($crlf,2)
} 
 
on *:sockread:sockkamus:{
  var %kode | sockread %kode
 
  if (%kamusno2 isin $nohtml(%kode)) {
    set %kamusno1 1
    ;msg %kamuschan [Kamus] $+(%kamusnick,:) Hasil tidak ditemukan untuk $+(',%kamuscari,')
    notice %kamusnick [Kamus] Hasil tidak ditemukan untuk $(',%kamuscari,')
    return
  }
 
  if (<li> isin %kode) && (<li><a !isin %kode) { 
    var %hasil = $nohtml($replace(%kode,$(</li>),$(/)))
    %hasil = $left(%hasil,$calc($len(%hasil)-1))
    ;msg %kamuschan [Kamus] $+(%kamusnick,:) %hasil
    notice %kamusnick [Kamus] %hasil
  }
} 
 
on *:sockclose:sockkamus: { 
  if (%kamusno1 == 0) {
    ;msg %kamuschan $+([Kamus] disalin dari http://www.kamus.net/result.php?w=en-usa&q=,$_encode(%kamuscari),&submit=Search&e=0) 
    notice %kamusnick $+([Kamus] disalin dari http://www.kamus.net/result.php?w=en-usa&q=,$_encode(%kamuscari),&submit=Search&e=0) 
  }
}
 

Comments

  (0)  RSS

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom