FordLawnmower commented on a Page, Bitly url shortener  -  Mar 24, 2010

O.o That site is a little warped ;/
Here it is though :)

;shadyurl Url Shortener by Ford_Lawnmower irc.mindforge.org #USA-Chat
menu Channel,Status {
  .$iif($group(#shadyurl) == On,$style(1)) shadyurl Trigger
  ..$iif($group(#shadyurl) == On,$style(2)) On: .enable #shadyurl
  ..$iif($group(#shadyurl) == Off,$style(2)) Off: .disable #shadyurl
}
#shadyurl on
On $*:Text:/^(!|@)shadyurl.*/Si:#: {
  if ($timer($+(shadyurl,$network,$nick))) { return }
  .timer $+ $+(shadyurl,$network,$nick) 1 6 noop
  var %method $iif($regml(1) == !,.notice $nick,$iif($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/),.msg $chan,.notice $nick))
  Getshadyurl %method $2-
}
#shadyurl end
alias shadyurl { Getshadyurl echo -a $1- }
alias -l Getshadyurl {
  $1-2 07Searching ........
  var %sockname $+(shadyurl,$network,$2,$ticks)
  sockopen %sockname www.shadyurl.com 80
  sockmark %sockname $1-2 $+(/create.php?myUrl=,$3-)
}
On *:sockopen:shadyurl*: {
  if (!$sockerr) {
    sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0
    sockwrite -n $sockname Host: www.shadyurl.com
    sockwrite -n $sockname $crlf
  }
  else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
}
On *:sockread:shadyurl*: {
  if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
  else {
    var %shadyurl | sockread %shadyurl
    if ($regex(%shadyurl,/<p>is now<\/p> <a href='([^<]*)'>/)) {
      $gettok($sock($sockname).mark,1-2,32) 04S06H07a09d03y 04» $+(07,$regml(1),)
    }
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.