Jump to content

Haggis

Members
  • Posts

    400
  • Joined

  • Last visited

Posts posted by Haggis

  1. here you go travis

     

    alias /share {
        %sharing_file = $1-
      %tempsockname = imageshack_drone $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9)
      sockopen %tempsockname www.imageshack.us 80
      sockmark %tempsockname filename= $+ %sharing_file
    }
    
    
    
    
    on 1:sockopen:imageshack_drone*:{
    
      bset -t &postdata 1 -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="uploadtype" $+ $crlf $+ $crlf
    
      bset -t &postdata $calc($bvar(&postdata,0) + 1) on $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="fileupload"; filename=" $+ $nopath($gettok($mid($sock($sockname).mark,11),1,59)) $+ " $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Type: image/jpeg $+ $crlf $+ $crlf
    
      bread " $+ $gettok($mid($sock($sockname).mark,10),1,59) $+ " 0 $file($gettok($mid($sock($sockname).mark,10),1,59)).size &file_contents
      bcopy &postdata $calc($bvar(&postdata,0) + 1) &file_contents 1 -1
      bset -t &postdata $calc($bvar(&postdata,0) + 1) $crlf $+ -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="url" $+ $crlf $+ $crlf
    
      bset -t &postdata $calc($bvar(&postdata,0) + 1) paste image url here $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="email" $+ $crlf $+ $crlf $+ $crlf
    
    
      bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="MAX_FILE_SIZE" $+ $crlf $+ $crlf
    
      bset -t &postdata $calc($bvar(&postdata,0) + 1) 13145728 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="refer" $+ $crlf $+ $crlf
    
      bset -t &postdata $calc($bvar(&postdata,0) + 1) http://imageshack.us/ $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="brand" $+ $crlf $+ $crlf $+ $crlf
    
    
      bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="optsize" $+ $crlf $+ $crlf
    
      bset -t &postdata $calc($bvar(&postdata,0) + 1) 320x320 $+ $crlf
      bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410--
    
      sockwrite -nt $sockname POST / HTTP/1.1
      sockwrite -nt $sockname Host: imageshack.us
      sockwrite -nt $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ko; rv:1.9.0.10) Gecko/2009042316 Frefox/3.0.5
      sockwrite -nt $sockname Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      sockwrite -nt $sockname Accept-Language: en-us,en;q=0.8,ko-kr;q=0.5,ko;q=0.3
      sockwrite -nt $sockname Accept-Charset: EUC-KR,utf-8;q=0.7,*;q=0.7
      sockwrite -nt $sockname Keep-Alive: 1200
      sockwrite -nt $sockname Connection: keep-alive
      sockwrite -nt $sockname Referer: http://imageshack.us/?no_multi=1
      sockwrite -nt $sockname Content-Type: multipart/form-data; boundary=---------------------------18762165517410
      sockwrite -nt $sockname Content-Length: $bvar(&postdata,0) $+ $crlf $+ $crlf
      sockwrite $sockname &postdata
    }
    
    on 1:sockread:imageshack_drone*:{
      sockread -f %lol
      if $mid(%lol,1,9) = location: {
    
        %lol = $mid(%lol,11)
    echo -a 4Uploaded to imageshack: http:// $+ $gettok(%lol,2,$asc(/)) $+ / $+ $gettok($gettok(%lol,2-,$asc(?)),3-,$asc(=))
    
        set %link http:// $+ $gettok(%lol,2,$asc(/)) $+ / $+ $gettok($gettok(%lol,2-,$asc(?)),3-,$asc(=))
        unset %lol
    
    
      }
    
    }

  2. on 1:sockread:imageshack_drone*:{
      prog -o test
      prog -p 50
      prog -p 75
      prog -p 100
    
      sockread -f %lol
      if $mid(%lol,1,9) = location: {
        %lol = $mid(%lol,11)
        echo -a 4Uploaded to imageshack: http:// $+ $gettok(%lol,2,$asc(/)) $+ / $+ $gettok($gettok(%lol,2-,$asc(?)),3-,$asc(=))
        set %link http:// $+ $gettok(%lol,2,$asc(/)) $+ / $+ $gettok($gettok(%lol,2-,$asc(?)),3-,$asc(=))
        unset %lol
    
        echo -a File Uploaded.
    
        prog -c
      ;  unset %link
    
      }
    }

     

    its using the progress bar code in the downloads on here

     

    it give me this

     

     

    loads the progress bar goes to 50 then 75 then 100%

     

    then stops the file does not upload and it stays at 100% anddoes not close

     

    i have to close it manually

     

    if i take out all the line beginning prog it works fine

  3. i tried to make it multi room but now it seems to crash mirc lol and the nicklist does not show

     

     

    dialog nicklist {
      title "Nick"
      size -1 -1 86 314
      option dbu
      list 1, 10 20 75 293, size extsel hsbar vsbar
      text "Room name", 2, 3 2 80 8
      text "Chatters:", 3, 3 10 43 8
      text "num", 4, 54 11 29 8, right
      button "", 5, 1 21 8 283
    }
    
    menu channel {
      Nicklist: {
        if ($dialog(nicklist)) dialog -c nicklist $+ $active nicklist $+ $active
        dialog -m nicklist $+ $right(#,-1) nicklist
      }
    }
    
    on *:dialog:nicklist*:init:*: {
      dll dll\mdx.dll MarkDialog $dname
      dll dll\mdx.dll SetMircVersion $version
      dll dll\mdx.dll SetDialog $dname style
    ;dll dll\mdx.dll SetFont $dname 1 12 50 verdana
    ;dll dll\mdx.dll SetColor $dname 1 text $rgb (0,0,139)
      dll dll\mdx.dll SetControlMDX $dname 1 ListView report showsel noheader smallicon hottrack single > dll\views.mdx
      dll dll\mdx.dll SetControlMDX $dname 5 scrollbar vertical > dll\ctl_gen.mdx
      did -i $dname 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,$active),1,38) - 6) $+ :1 0:2
      dll dll\nicklist.dll Nicklist $dname $active
      did -ra $dname 5 1 0 114 15 2 1
      did -i $dname 1 1 iconsize normal small
      did -i $dname 1 1 seticon normal c:\mirc\icons\owner.ico
      did -i $dname 1 1 seticon normal c:\mirc\icons\host.ico
      did -i $dname 1 1 seticon normal c:\mirc\icons\no.ico
      did -i $dname 1 1 seticon normal c:\mirc\icons\voice.ico
      did -i $dname 1 1 seticon normal c:\mirc\icons\tick.ico
    
      listnicks
    }
    
    
    
    on *:join:#: listnicks
    on *:part:#: listnicks
    on *:kick:#: listnicks
    
    alias listnicks {
      did -ra nicklist $+ $right(#,-1) 4 $nick($active,0)
      did -ra nicklist $+ $right(#,-1) 2 $active
      var %x = 1
      did -r nicklist $+ $right(#,-1) 1
      while ($nick($active,%x)) {
        did -az nicklist $+ $right(#,-1) 1 0 + $nickicon($nick($active,%x)) $nick($active,%x)
        inc %x
    
      }
      .timerresize -m 0 1 resize $active
    }
    
    alias relistnicks {
      .remove nicklist.txt
      var %x = $gettok($calc($did(nicklist $+ $right(#,-1),1).lines * $gettok($did(nicklist $+ $right(#,-1),5).text,1,32) / 100),1,$asc(.))
      did -r nicklist $+ $right(#,-1) 1
      while ($nick($active,%x)) {
        write -l $+ %x nicklist.txt 0 + $nickicon($nick($active,%x)) $nick($active,%x)
        inc %x
      }
      loadbuf -ro nicklist $+ $right(#,-1) 1 nicklist.txt
      .timerresize -m 0 1 resize $active
    }
    alias nickicon {
      if ($left($nick($active,$1).pnick,1) == ~) return 1
      if ($left($nick($active,$1).pnick,1) == &) || ($left($nick($active,$1).pnick,1) == @) return 2
      if ($left($nick($active,$1).pnick,1) == +) return 4
      if ($left($nick($active,$1).pnick,1) == %) return 2
      else return 3
    }
    
    alias resize {
      var %achan $1-
      if ($dialog(nicklist $+ $right(#,-1)).w $dialog(nicklist $+ $right(#,-1)).h > $dll(dll\nicklist.dll,GetSize,%achan)) || ($dialog(nicklist $+ $right(#,-1)).w $dialog(nicklist $+ $right(#,-1)).h < $dll(dll\nicklist.dll,GetSize,%achan)) {
        dll dll\mdx.dll SetDialog nicklist $+ $right(#,-1) coords 0 0 $dll(dll\nicklist.dll,GetSize,%achan)
        dll dll\mdx.dll MoveControl nicklist $+ $right(#,-1) 1 * * $gettok($dll(dll\nicklist.dll,GetSize,%achan),1,32) 2000
        if ($dialog(nicklist $+ $right(#,-1))) {
          did -i nicklist $+ $right(#,-1) 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,%achan),1,38) - 6) $+ :1 0:2
        }
        listnicks
      }
    }
    ;on 1:ACTIVE:*: {
    ;  if ($dialog(nicklist)) dialog -c nicklist nicklist
    ;  dialog -m nicklist nicklist
    ;}

     

     

×
×
  • Create New...