#Shax@Quakenet.org

Home­FAQ­Search­Memberlist­Usergroups­Register­Log in
Share | 
 

 google socket

View previous topic View next topic Go down 
AuthorMessage
capurro



Posts: 8
Join date: 2008-12-14
Age: 19
Location: TÜRKEY C*

PostSubject: google socket   Tue Dec 23, 2008 6:10 pm

on $*:TEXT:/^.google\b/i:#:{
if ($2) {
var %a = 1
while ($sock(google. $+ %a) != $null) {
inc %a
}
sockopen google. $+ %a www.google.com 80
sockmark google. $+ %a $+($iif($left($1,1) == @,msg $chan,.notice $nick),$chr(160),$2-)
}
else {
$iif($left($1,1) == !,.notice $nick,msg $chan) $+([,$google,]) http://www.google.com/
}
}
on *:SOCKOPEN:google.*:{
sockwrite $sockname $+(GET /search?hl=en&q=, $regsubex($gettok($sock($sockname).mark,2,160),/(\W)/g,% $+
$base($asc(\t),10,16,2)),&btnI=I%27m+Feeling+Lucky HTTP/1.1,$crlf,Host: www.google.com,$crlf,$crlf)
}
on *:SOCKREAD:google.*:{
var %var
$event %var
if ($gettok(%var,1,32) === Location:) {
$gettok($sock($sockname).mark,1,160) $+([,$google,]) $gettok(%var,2-,32)
}
}

Basketball
Back to top Go down
View user profile http://www.capurro.tk
 

google socket

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
#Shax@Quakenet.org :: MSL-