Top

mIRC_Wiki


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Nov 03, 2008
Last Updated  Nov 03, 2008
Tags  indonesia  indonesian  irc  mirc  wiki  wikipedia 

Introduction

This is a simple script to enable users in channel to ask id.wikipedia.org (Wikipedia Indonesia)
and the answer will send through notice.
Many thanks to :
- Google Search v1.93 by Meij <meijie@gmail.com>
- Sanjisan <sanjisan.wordpress.com>
- id.wikipedia.org

Grab the Code

;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;mIRC_Wiki
;By Sidik on irc.myquran.org #myquran
;Last updated: 20081031
;Thanks for Meij n Sanjisan
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
;Semua code ALIAS taruh di bawah ini 
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
alias socket.wik {
  sockclose sockwik
  sockopen sockwik id.wikipedia.org 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:!wiki *:#: {
  set %wikichan $chan
  set %wikicari $2-
  set %wikinick $nick
  set %wikino1 0
  set %wikino2 Wikipedia tidak memiliki artikel
 
  /socket.wik
}
 
on *:sockopen:sockwik:{
  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] $+(/w/index.php?title=,$_encode(%wikicari),&redirect=yes)
  sockwrite -nt $sockname GET $+(/w/index.php?title=,$_encode(%wikicari),&redirect=yes) HTTP/1.0
  sockwrite -nt $sockname Accept-Language: id
  sockwrite -nt $sockname User-Agent: mIRC_Wiki/Beta
  sockwrite -nt $sockname Referer: http://id.wikipedia.org
  sockwrite -nt $sockname Host: id.wikipedia.org
  sockwrite -nt $sockname Connection: close
  sockwrite -t $sockname $str($crlf,2)
} 
 
on *:sockread:sockwik:{
  var %kode | sockread %kode
 
  ;kalo mo liat aslinya pake View Page Source di Firefox
  if (<p><b> isin %kode) { 
    ;timer 1 1 msg %wikichan [Wiki] $+(%wikinick,:) $nohtml(%kode) 
    notice %wikinick [Wiki] $nohtml(%kode) 
  }
 
  if (%wikino2 isin $nohtml(%kode)) {
    set %wikino1 1
  }
} 
 
on *:sockclose:sockwik: { 
  if (%wikino1 == 0) {
    ;msg %wikichan $+([Wiki] disalin dari http://id.wikipedia.org/wiki/,%wikicari) 
    notice %wikinick $+([Wiki] disalin dari http://id.wikipedia.org/wiki/,$_encode(%wikicari)) 
  }
}
 

Comments

  (3)  RSS
digi23
Comments: 1
 
mIRC Snippet:  mIRC_Wiki
Posted on Nov 15, 2008 3:48 am
can it retrive in english laguage?
xOtic
Comments: 12
 
mIRC Snippet:  mIRC_Wiki
Posted on Nov 15, 2008 8:55 am
digi23!!! are you serious?? change the id (indonesia) to a en (english)

well done!

peace!!!!
sidik999
Comments: 1
 
mIRC Snippet:  mIRC_Wiki
Posted on Nov 17, 2008 7:12 pm
thx to xOtic

Commenting Options

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

  
Bottom