User:Hemanshu/myscript

From Wikipedia, the free encyclopedia

my mirc script for cricket.

on ^*:HOTLINK:*:*:{
  if ([[* iswm $1) || (*]] iswm $1) || ($+(*,[,[,*,$1,*,],],*) iswm $hotline) {
    return 
  } 
  else { 
    halt
  } 
}
on *:HOTLINK:*:*:{
  if ([[*]] iswm $1) {
    var %page = $mid($1,3,-2)
  }
  elseif ([[* iswm $1) && ($regex($hotline,$+(\[\[,$chr(40),$right($1,-2),[^\[]*,$chr(41),\]\]))) {
    var %page = $regml(1)
  }
  elseif (*]] iswm $1) && ($regex($hotline,$+(\[\[,$chr(40),[^\[]*,$left($1,-2),$chr(41),\]\]))) {
    var %page = $regml(1)
  }
  elseif ($regex($hotline,$+(\[\[,$chr(40),[^\[]*,$1,[^\[]*,$chr(41),\]\]))) {
    var %page = $regml(1)
  }
  else {
    return
  }
  ;run http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&btnI=I'm+feeling+lucky&q=site:www.cricket.org+ $+ $replace(%page,$chr(32),+)
  run http://news.google.com/news?hl=en&ie=UTF-8&oe=UTF-8&q= $+ $replace(%page,$chr(32),+)
}