Advertisement
Guest User

mIRC Alias Pastebin Script

a guest
Aug 31st, 2012
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.00 KB | None | 0 0
  1. paste {
  2.   sockclose Pastebin
  3.   if (!$1) {
  4.     var %P~ = 1
  5.     while (%P~ <= $cb(0)) && ($len(%Paste) <= 3950) {
  6.       set %Paste %Paste $+ $cb(%P~) $+ $crlf
  7.       inc %P~
  8.     }
  9.   }
  10.   set %Paste api_dev_key=__DEVKEY__&api_option=paste&api_paste_code= $+ $regsubex($iif(!$1,%Paste,$1-),/([ `@#$%^&\+=\[\]{}\\|;'",<>\/\?])/g,% $+ $base($asc(\t),10,16))
  11.   sockopen Pastebin pastebin.com 80
  12. }
  13.  
  14. on *:SOCKOPEN:Pastebin: {
  15.   sockwrite -n Pastebin POST /api/api_post.php HTTP/1.1
  16.   sockwrite -n Pastebin Host: pastebin.com
  17.   sockwrite -n Pastebin Content-Type: application/x-www-form-urlencoded
  18.   sockwrite -n Pastebin Content-length: $len(%Paste)
  19.   sockwrite Pastebin $crlf
  20.   sockwrite Pastebin %Paste
  21. }
  22.  
  23. on *:SOCKREAD:Pastebin: {
  24.   var %P
  25.   sockread %P
  26.   while ($sockbr) {
  27.     if (http://pastebin.com/ isin %P) || (Bad API request isin %P) {
  28.       $iif(http://pastebin.com/ isin %P,clipboard %P)
  29.       echo 4 -ag %P
  30.       unset %Paste
  31.       sockclose Pastebin
  32.       return
  33.     }
  34.     sockread %P
  35.   }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement