Advertisement
illpastethat

gas price zzbooze

Feb 24th, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.67 KB | None | 0 0
  1. on *:text:.gas *:#: {
  2.   if ($2 !isnum) { halt }
  3.   if ($sock(gas)) { sockclose gas }
  4.   set %gas.zip $2
  5.   sockopen gas www.motortrend.com 80
  6.   sockmark gas msg $chan
  7. }
  8.  
  9. on *:SOCKOPEN:gas:{
  10.   sockwrite -nt $sockname GET /gas_prices/34/ $+ %gas.zip $+ / HTTP/1.1
  11.   sockwrite -nt $sockname Host: www.motortrend.com
  12.   sockwrite -nt $sockname $crlf
  13. }
  14.  
  15. on *:sockread:gas: {
  16.   var %g
  17.   sockread %g
  18.   if (*we are currently* iswm %g) {
  19.     $sock(gas).mark %g
  20.     sockclose gas
  21.   }
  22.   if (*<td class="pad brdr1_b">* iswm %g) {
  23.     hinc -mu4 gas c 1
  24.     $sock(gas).mark 3 $regsubex(%g,/<[^>]*>|\t/g,$chr(32)) 
  25.   }
  26.   if ($hget(gas,c) == %gas.zip) { sockclose gas }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement