Advertisement
illpastethat

Alice AI socket for st34lthx

Jan 10th, 2012
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.92 KB | None | 0 0
  1. alias urlencode return $replacex($regsubex($$1-,/([^\w\s])/Sg,$+(%,$base($asc(\t),10,16,2))),$chr(32),+,$chr(43),%2B)
  2.  
  3. alias alice {
  4.   var %ticks $ticks
  5.   set $+(%,alice.,%ticks,.msgtype) echo -a
  6.   set $+(%,alice.,%ticks,.input) $urlencode($1-)
  7.   sockopen $+(alice.,%ticks) noneevr2.r00t.la 80
  8. }
  9.  
  10.  
  11. on *:sockopen:alice*: {  
  12.   sockwrite -nt $sockname GET $+(/ALICE.php?in=,$($+(%,alice.,$remove($sockname,alice.),.input),2)) HTTP/1.1
  13.   sockwrite -nt $sockname Host: noneevr2.r00t.la
  14.   sockwrite -nt $sockname $crlf
  15. }
  16.  
  17. on *:SOCKREAD:alice*: {
  18.   if ($sockerr) {
  19.     echo -a SOCKET ERROR: $sockerr
  20.     halt
  21.   }
  22.   inc $+(%,alice.,$remove($sockname,alice.),.counter)
  23.   sockread -f %sockreader
  24.   if ($($+(%,alice.,$remove($sockname,alice.),.counter),2) == 9) {
  25.     $($+(%,alice.,$remove($sockname,alice.),.msgtype),2) %sockreader
  26.     unset $+(%,alice.,$remove($sockname,alice.),.*)
  27.     sockclose $sockname
  28.   }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement