Torrent Search

forum.utorrent.com

µTorrent Community

You are not logged in.

Announcement

This forum is NOT for help with anything you've downloaded! Ask for help with downloaded files and the thread will be deleted.
Posting about any illegal sharing of copyrighted content is strictly FORBIDDEN.

Want to join the Falcon beta? Get your invite here!

#1 2006-10-11 09:36:59

Lord Alderaan
Member

mIRC script

Original incarnation: 2006-10-17 12:45 UTC
Current incarnation: 2009-08-31 11:00 UTC

Major changes over the years:

  • Total Downloaded/Uploaded info over the currently loaded torrents (this does not and can not equal the stats in the µTorrent statusbar or Help Show Statistics)

  • Channel commands off by default.

  • Channel commands set per channel.

  • Added token support


Install
In µTorrent press ctrl+P
Goto Web UI section
Enable Web UI
Fill in Username and Password.
Goto Connection
Write down the Port.
Press Ok

In mirc press alt+r
Goto the Remote tab
Choose File -> New
Paste the content of the codebox below in the script editor.
Goto the line var %ut_username guest and replace guest with the username you set in µTorrent.
Do the same for password and port.
If µtorrent does NOT run on the same computer as the mirc script do the same with the url line and fill in the IP or hosname of the computer running µTorrent.
Optional: There is a r-click menu script by memosis you could paste at the bottom.
Choose File -> Save
Press Ok

Type /uthelp



Code

Code:

; type /uthelp for info

alias ut_getinfo {

  ; Incarnation: 2009-08-31 11:00

  ; -============================ CHANGE THE VALUES BELOW ============================- ;

  ; the username for the webui:
  var %ut_username guest

  ; the password for the webui:
  var %ut_password guest

  ; the hostname or ip of the machine running µtorrent, if µtorrent + webui is running on the same computer leave it at localhost:
  set -n %ut_url localhost

  ; µtorrent port (or the alternative webui port if activated):
  set -n %ut_port 32459

  ; OPTIONAL! maximum number of displayed torrentlines (not counting header and footer):
  set %ut_flood_max 5

  ; -============================ CHANGE THE VALUES ABOVE ============================- ;

  var %continue $false
  if ( $sock(ut_info).to ) {
    if ( $sock(ut_info).to > 25 ) {
      ut_getinfo_end
      %continue = $true
    }
  }
  else {
    %continue = $true
  }
  if ( %continue == $true && $1 && $2 ) {
    set %ut_activechan $1
    set %ut_action $2
    if ( %ut_action == find && $3 ) {
      set %ut_find_string $3-
      ;      msg %ut_activechan 12[µT] Showing the first %ut_flood_max torrents containing $3-
    }
    elseif ( %ut_action == downloading ) {
      ;      msg %ut_activechan 12[µT] Showing the first %ut_flood_max torrents downloading.
    }
    elseif ( %ut_action == seeding ) {
      ;      msg %ut_activechan 12[µT] Showing the first %ut_flood_max torrents seeding.
    }
    set %ut_credentials $encode(%ut_username $+ : $+ %ut_password,m)
    set %ut_download 0
    set %ut_downloadingcount 0
    set %ut_err_torrents 0
    set %ut_flood_count 0
    set %ut_ratio_sum 0
    set %ut_remaining 0
    set %ut_seedingcount 0
    set %ut_sockerr 0
    set %ut_torrentcount 0
    set %ut_upload 0
    set %ut_downloaded
    set %ut_uploaded
    .timerut_getinfo_end 1 20 ut_getinfo_end
    sockopen ut_token %ut_url %ut_port
  }
}


on 1:SOCKOPEN:ut_token:{
  if ( $sockerr > 0 ) {
    %ut_sockerr = $sockerr
    ut_getinfo_end
    return
  }
  sockwrite -n $sockname GET /gui/token.html HTTP/1.1
  sockwrite -n $sockname Host: $+(%ut_url,:,%ut_port)
  sockwrite -n $sockname Authorization: Basic %ut_credentials
  sockwrite -n $sockname $crlf
}

on 1:SOCKREAD:ut_token:{
  if ( $sockerr > 0 ) {
    %ut_sockerr = $sockerr
    echo ow: $sockerr
    ut_getinfo_end
    return
  }
  var %i 1
  while (%i > 0 ) {
    sockread -f %temp
    if ( $+(id,$chr(61),$chr(34),token,$chr(34)) isin %temp || $+(id,$chr(61),$chr(39),token,$chr(39)) isin %temp ) {
      if ( $regex(ut_re,%temp,/<div[^>]*id=["\']token["\'][^>]*>([^<]*)</div>/) > 0 ) {
        set %ut_token $regml(ut_re,1)
        sockopen ut_info %ut_url %ut_port
        sockclose ut_token
      }
    }
    %i = $sockbr
  }
}

on 1:SOCKOPEN:ut_info:{
  if ( $sockerr > 0 ) {
    %ut_sockerr = $sockerr
    ut_getinfo_end
    return
  }
  sockwrite -n $sockname GET /gui/?list=1&token= $+ %ut_token HTTP/1.1
  sockwrite -n $sockname Host: $+(%ut_url,:,%ut_port)
  sockwrite -n $sockname Authorization: Basic %ut_credentials
  sockwrite -n $sockname $crlf
  unset %ut_credentials
  unset %ut_url
}

on 1:SOCKREAD:ut_info:{
  if ( $sockerr > 0 ) {
    %ut_sockerr = $sockerr
    ut_getinfo_end
    return
  }
  sockread %temp
  if ( $left(%temp,12) == ,"torrentc": ) {
    ut_getinfo_end
  } 
  else {
    var %temp2 = $mid( %temp , 2, $calc( $len( %temp ) - 3 )  )
    var %temp2 = $replace(%temp2,\",`)
    if ( $numtok(%temp2,44) >= 19 ) {
      var %hash = $gettok(%temp2,1,34)
      var %torrentname = $gettok(%temp2,3,34)
      var %label
      if ( $numtok(%temp2,34) == 6 ) {
        %label = $gettok(%temp2,5,34)
        %temp2 = $replace(%temp2,%label,)
      }
      %temp2 = $replace(%temp2,%torrentname,,%hash,)
      %torrentname = $replace(%torrentname,`,")
      if ( $numtok(%temp2,44) == 19 ) {
        var %progress $gettok(%temp2,5,44)
        var %status $gettok(%temp2,2,44)
        inc %ut_remaining $gettok(%temp2,19,44)
        inc %ut_torrentcount
        inc %ut_download $gettok(%temp2,10,44)
        inc %ut_upload $gettok(%temp2,9,44)
        inc %ut_downloaded $gettok(%temp2,6,44)
        inc %ut_uploaded $gettok(%temp2,7,44)
        inc %ut_ratio_sum $gettok(%temp2,8,44)
        if ( $isbit(%status,1) == 1 && $isbit(%status,6) == 0 ) {
          if ( %progress == 1000 ) {
            inc %ut_seedingcount
          }
          else {
            inc %ut_downloadingcount
          }
        }
        if ( %ut_action == find ) {
          if ( %ut_find_string isin %torrentname ) {
            if ( %ut_flood_count < %ut_flood_max ) {
              if ( %progress == 1000 ) {
                var %temp = 12[µT]14 $left(%torrentname,40)  $+ $ut_convert_status( %status , %progress ) UP: $+ $bytes( $gettok(%temp2,7,44) ).suf SIZE: $+ $bytes( $gettok(%temp2,4,44) ).suf R: $+ $calc( $gettok(%temp2,8,44) / 1000) UL: $+ $bytes( $gettok(%temp2,9,44) ).suf $+ /s P: $+ $gettok(%temp2,13,44) $+ ( $+ $gettok(%temp2,14,44) $+ ) S: $+ $gettok(%temp2,15,44) $+ ( $+ $gettok(%temp2,16,44) $+ )
              }
              else {
                var %temp = 12[µT]14 $left(%torrentname,40)  $+ $ut_convert_status( %status , %progress ) DOWN: $+ $bytes( $gettok(%temp2,6,44) ).suf SIZE: $+ $bytes( $gettok(%temp2,4,44) ).suf P: $+ $calc( %progress / 10) $+ $chr(37) DL: $+ $bytes( $gettok(%temp2,10,44) ).suf $+ /s P: $+ $gettok(%temp2,13,44) $+ ( $+ $gettok(%temp2,14,44) $+ ) S: $+ $gettok(%temp2,15,44) $+ ( $+ $gettok(%temp2,16,44) $+ ) ETA: $+ $duration( $gettok(%temp2,11,44) )
              }
              msg %ut_activechan %temp
            }
            inc %ut_flood_count
          }
        }
        elseif ( %ut_action == downloading && %progress < 1000 && $isbit(%status,1) == 1 && $isbit(%status,6) == 0) {
          if ( %ut_flood_count < %ut_flood_max ) {
            var %temp = 12[µT]14 $left(%torrentname,40)  $+ $ut_convert_status( %status , %progress ) DOWN: $+ $bytes( $gettok(%temp2,6,44) ).suf SIZE: $+ $bytes( $gettok(%temp2,4,44) ).suf P: $+ $calc( %progress / 10) $+ $chr(37) DL: $+ $bytes( $gettok(%temp2,10,44) ).suf $+ /s P: $+ $gettok(%temp2,13,44) $+ ( $+ $gettok(%temp2,14,44) $+ ) S: $+ $gettok(%temp2,15,44) $+ ( $+ $gettok(%temp2,16,44) $+ ) ETA: $+ $duration( $gettok(%temp2,11,44) )
            msg %ut_activechan %temp
          }
          inc %ut_flood_count
        }
        elseif ( %ut_action == seeding && %progress == 1000 && $isbit(%status,1) == 1 && $isbit(%status,6) == 0 ) {
          if ( %ut_flood_count < %ut_flood_max ) {
            var %temp 12[µT]14 $left(%torrentname,40)  $+ $ut_convert_status( %status , %progress ) UP: $+ $bytes( $gettok(%temp2,7,44) ).suf SIZE: $+ $bytes( $gettok(%temp2,4,44) ).suf R: $+ $calc( $gettok(%temp2,8,44) / 1000) UL: $+ $bytes( $gettok(%temp2,9,44) ).suf $+ /s P: $+ $gettok(%temp2,13,44) $+ ( $+ $gettok(%temp2,14,44) $+ ) S: $+ $gettok(%temp2,15,44) $+ ( $+ $gettok(%temp2,16,44) $+ )
            msg %ut_activechan %temp
          }
          inc %ut_flood_count
        }
      }
      else {
        inc %ut_err_torrents
      }
    }
  }
  unset %temp
}

alias ut_getinfo_end {
  sockclose ut_token
  sockclose ut_info
  if ( %ut_sockerr == 0 ) {
    if ( %ut_action == find || %ut_action == downloading || %ut_action == seeding ) {
      ;      msg %ut_activechan 12[µT] Found %ut_flood_count torrents.
    }
    if ( %ut_action == stats ) {
      if ( %ut_err_torrents > 0 ) {
        var %temp = 12[µT] Torrents: $calc( %ut_torrentcount + %ut_err_torrents ) (Seed: $+ %ut_seedingcount $+ , Leech: $+ %ut_downloadingcount $+ , Inactive: $+ $calc( %ut_torrentcount - %ut_seedingcount - %ut_downloadingcount ) $+ , Unknown: $+ %ut_err_torrents $+ ).  $bytes(%ut_download).suf $+ /s down, $bytes(%ut_upload).suf $+ /s up. Ratio: $round($calc($calc(%ut_ratio_sum / 1000) / %ut_torrentcount),2) Remaining: $bytes( %ut_remaining ).suf Downloaded: $bytes( %ut_downloaded ).suf Uploaded: $bytes( %ut_uploaded ).suf
      }
      else {
        var %temp = 12[µT] Torrents: %ut_torrentcount (Seed: $+ %ut_seedingcount $+ , Leech: $+ %ut_downloadingcount $+ , Inactive: $+ $calc( %ut_torrentcount - %ut_seedingcount - %ut_downloadingcount ) $+ ).  $bytes(%ut_download).suf $+ /s down, $bytes(%ut_upload).suf $+ /s up. Ratio: $round($calc($calc(%ut_ratio_sum / 1000) / %ut_torrentcount),2) Remaining: $bytes( %ut_remaining ).suf Downloaded: $bytes( %ut_downloaded ).suf Uploaded: $bytes( %ut_uploaded ).suf
      }
      msg %ut_activechan %temp
    }
  }
  else {
    ;    msg %ut_activechan 12[µT] Error: webui is not responding (socket error).
  }
  unset %ut_action
  unset %ut_activechan
  unset %ut_credentials
  unset %ut_download
  unset %ut_downloadingcount
  unset %ut_err_torrents
  unset %ut_find_string
  unset %ut_flood_max
  unset %ut_flood_count
  unset %ut_ratio_sum
  unset %ut_remaining
  unset %ut_seedingcount
  unset %ut_sockerr
  unset %ut_torrentcount
  unset %ut_url
  unset %ut_upload
  unset %temp
  .timerut_getinfo_end off
}

alias ut_convert_status {
  if ( $1 isnum && $2 isnum ) {
    if ( $isbit( $1, 1) == 1 ) {
      if ( $isbit( $1, 6) == 1 ) {
        return Paused
      }
      else {
        if ( $isbit( $1, 7) == 1 ) {
          if ( $2 == 1000 ) {
            return Seeding
          }
          else {
            return Downloading
          }
        }
        else {
          if ( $2 == 1000 ) {
            return Seeding [F]
          }
          else {
            return Downloading [F]
          }
        }
      }
    }
    elseif ( $isbit( $1 , 2 ) == 1 ) {
      return Checking
    }
    elseif ( $isbit( $1 , 5 ) == 1 ) {
      return Error
    }
    elseif ( $isbit( $1 , 7 ) == 1 ) {
      if ( $2 == 1000 ) {
        return Queued Seeding
      }
      else {
        return Queued
      }
    }
    if ( $2 == 1000 ) {
      return Finished
    }
    else {
      return Stopped
    }
  }
  return Invalid
}

alias utstats {
  ut_getinfo $chan stats
}
alias utdl {
  ut_getinfo $chan downloading
}
alias utul {
  ut_getinfo $chan seeding
}
alias utfind {
  ut_getinfo $chan find $1-
}
alias uthelp {
  echo Command -=- Workings (Make sure you have filled in the username, password, hostname and port of µtorrent in the script first)
  echo /uthelp -=- Shows this info
  echo /utstats -=- Shows overall µtorrent stats
  echo /utdl -=- Shows torrents currently downloading
  echo /utul -=- Shows torrents currently seeding
  echo /utfind string -=- Shows torrents containing the string
  echo /utchan enable/disable -=- Enables/Disables the channel commands (disabled by default). (eg: !utstats)
  echo People in a channel can request your info using a ! instead of a / in the command (eg: !utstats)

}
alias utchan {
  if ( $1 == enable ) {
    set %ut_perm_nochan_ $+ $chan 0
    echo uTorrent channel commands enabled for $chan
  }
  else {
    set %ut_perm_nochan_ $+ $chan 1
    echo uTorrent channel commands disabled for $chan
  }
}
on *:TEXT:!ut*:#:{
  if ( $eval( $var( ut_perm_nochan_ $+ $chan, 1 ), 2 ) == 0 ) {
    if ( $1 == !utstats ) {
      ut_getinfo $chan stats
    }
    elseif ( $1 == !utdl ) {
      ut_getinfo $chan downloading
    }
    elseif ( $1 == !utul ) {
      ut_getinfo $chan seeding
    }
    elseif ( $1 == !utfind ) {
      ut_getinfo $chan find $2-
    }
  }
}

Rantings
Although its been a while since I used it I believe GTSDLL has simular functionality (propably even with more features). However I didn't like GTSDLL back then because it can freeze mIRC while it queries µTorrent. This script also has the advantage it doesn't have to run on the same machine as µtorrent is running.

You can run this script on your PC and have µtorrent run on a server somewhere else. As long as you can reach the webui on that machine this script should be able to reach it too.

Although this script is more or less ready for use it functions more as an example or core to write your own script around. In its current form it supports a couple commands for you and allows for them to be called by other people in a channel (this can be disabled).

You will have to edit some values in the script to match your setting.

Terms:
This script was originally intended as nothing more then an working example. Therefore you are free to use and change the above code and redistribute it in any way.

The only requirement is that you do not make false claims about this script or scripts derived from this one. i.e. no credits needed but when people ask don't forget to mention this as (at least) an inspiration tongue

Last edited by Lord Alderaan (2009-08-31 04:06:05)


-= FAQ Guides Manual Help =-
Everything about the Webui!

Offline

 

#2 2006-10-14 09:52:49

Sylf
Member

Re: mIRC script

This is the ajax code that determines what the status of the torrent is.

_73 is the 2nd item in the torrent info (201 etc).
_74 is the 5th item.
For example for items like

Code:

["67DE993C27099804C1DD59524EAF230576F8C0EE",136,"Torrent Name",429187922,1000,0,5062045308,11794,0,0,-1,"",0,0,0,0,65536,-1,0],

_73=136 and _74=1000.

Code:

    function getStatusIcon(_73,_74)
    {
        var _75="",status="";
        if(_73&1)
        {
            if(_73&32)
            {
                _75="Status_Paused";
                status="Pausing";
            }
            else
            {
                _75=(_74==1000)?"Status_Up":"Status_Down";
                status=(_74==1000)?"Seeding":"Downloading";
            }
        }
        else
        {
            if(_73&2)
            {
                _75="Status_Checking";
                if(_73&32)
                {
                    _75="Status_Paused";
                }
                status="Checking";
            }
            else
            {
                if(_73&16)
                {
                    _75="Status_Error";
                    status="Error";
                }
                else
                {
                    if(_73&64)
                    {
                        _75=(_74==1000)?"Status_Queued_Up":"Status_Queued_Down";
                        status="Queued";
                    }
                }
            }
        }
        
        if(!(_73&64)&&!(_73&2)){status+=" [F]";}
        if((_74==1000)&&(_75=="")){_75="Status_Completed";status="Finished";}
        if((_74<1000)&&(_75=="")){_75="Status_Incompleted";status="Stopped";}
        return [_75,status];
    }

Offline

 

#3 2006-10-14 12:47:07

silverfire
Member

Re: mIRC script

Why the blazing hell are you doing this? Just get GTSDll. It does the same thing, but through accessing the information out of Windows API's.


Read the rules! | Read the FAQ! | #utorrent@irc.p2p-network.net
Think you have speed issues? Try the Fedora 9 torrent before posting.

Offline

 

#4 2006-10-14 13:25:13

Sylf
Member

Re: mIRC script

:p  I was doing that out of preparation for making a plug-in for XChat.  We don't have the nice plugin like gtsdll.

Offline

 

#5 2006-10-14 19:44:41

silverfire
Member

Re: mIRC script

All you need to do is find out how the DLL interacts with mIRC. The calls that the script makes to the DLL can be replicated in TCL, Perl, or whatever XChat uses.


Read the rules! | Read the FAQ! | #utorrent@irc.p2p-network.net
Think you have speed issues? Try the Fedora 9 torrent before posting.

Offline

 

#6 2006-10-15 13:29:47

Firon
Administrator

Re: mIRC script

Using the webui is probably a much cleaner solution than querying the window for information.

Offline

 

#7 2006-10-16 01:37:56

Pleh
Member

Re: mIRC script

The second value represents the status of the torrent. It works by adding up different statuses, you need to compare the value using bitwise operators. for example...

1 = Started
2 = Checking
4 = ?
8 = ?
16 = Error
32 = Paused
64 = Queued
128 = ?

So if the value is 201 then 128 + 64 + 8 + 1 = 201 so that means 201 is Started, Queued ,? and ?

Im not sure what the other values are going to be, but at the moment they are not used.


Here is the function i use in actionscript, you will need to change it to whatever language you need, but you will get the idea...

function ParseStatus(torrent:Object):Object{
    if (torrent.StatusID & 1){ //Started
        if (torrent.StatusID & 32){ //paused
            torrent.Image = 'Paused';
            torrent.Status = 'Paused';
        } else { //seeding or leeching
            if (torrent.StatusID & 64){ //queued
                torrent.Image = (torrent.Done == 1000) ? 'Uploading' : 'Downloading';
                torrent.Status = (torrent.Done == 1000) ? 'Seeding' : 'Downloading';
            } else {
                torrent.Image = (torrent.Done == 1000) ? 'Uploading' : 'Downloading';
                torrent.Status = (torrent.Done == 1000) ? 'Seeding [F]' : 'Downloading [F]';
            }
        }
    } else if (torrent.StatusID & 2){ //checking
        torrent.Image = 'Checking';
        torrent.Status = 'Checking';
    } else if (torrent.StatusID & 16){ //error
        torrent.Image = 'Error';
        torrent.Status = 'Error';
    } else if (torrent.StatusID & 64){ //queued
        torrent.Image = (torrent.Done == 1000) ? 'Uploading' : 'Downloading';
        torrent.Status = 'Queued';
    }
    if ((torrent.Done == 1000) && (torrent.Image == undefined)) {torrent.Image = 'Finished'; torrent.Status = 'Finished';}
    if ((torrent.Done < 1000) && (torrent.Image == undefined)) {torrent.Image = 'Stopped'; torrent.Status = 'Stopped';}
    if(torrent.Status == undefined){torrent.Status = torrent.StatusID}
    return torrent
}


Creator of the FlashUI

Add the awesome power of Flash to the awsome power of uTorrent and you get something so good you will find it hard not to pee your pants!

Offline

 

#8 2006-10-16 05:15:50

ICleolion
Member

Re: mIRC script

I think 4 means Forced Mode


One of these days... POW RIGHT IN THE KISSER

Offline

 

#9 2006-10-16 06:06:39

Pleh
Member

Re: mIRC script

Actually not having 64 means force mode. its the opposite of queued, by queued i dont mean just waiting to download, i mean if the torrent is in the que, as in not being forced. If that makes sense :s

Last edited by Pleh (2006-10-16 06:08:03)


Creator of the FlashUI

Add the awesome power of Flash to the awsome power of uTorrent and you get something so good you will find it hard not to pee your pants!

Offline

 

#10 2006-10-16 06:10:17

ICleolion
Member

Re: mIRC script

What about torrents that aren't queued when in normal mode, but are forced anyway?

Last edited by ICleolion (2006-10-16 06:11:41)


One of these days... POW RIGHT IN THE KISSER

Offline

 

#11 2006-10-16 06:15:56

Pleh
Member

Re: mIRC script

Are you refering to torrents that are stopped but forced? They would just not contain 64 or 1


Creator of the FlashUI

Add the awesome power of Flash to the awsome power of uTorrent and you get something so good you will find it hard not to pee your pants!

Offline

 

#12 2006-10-16 06:17:25

ICleolion
Member

Re: mIRC script

No im refering to torrents that are rechecking and have been set to enter forced mode when finished rechecking.  Or say u only have 1 torrent and its in downloading mode, but for some reason the user has set it to forced mode anyway.


One of these days... POW RIGHT IN THE KISSER

Offline

 

#13 2006-10-16 06:29:19

Pleh
Member

Re: mIRC script

If you only have 1 torrent in forced mode then the status value will not contain 64 but will contain 1. If the torrent is checking and forced then it will contain 2 but not 64. If its checking and going to join the normal que after, it will contain 2 and 64.

Last edited by Pleh (2006-10-16 06:29:49)


Creator of the FlashUI

Add the awesome power of Flash to the awsome power of uTorrent and you get something so good you will find it hard not to pee your pants!

Offline

 

#14 2006-10-16 07:36:42

Lord Alderaan
Member

Re: mIRC script

Thanks for all the info guys. I used GTSDLL with utorrent once but disliked it for some reason I forgot now smile

I use GTSDLL for MPC stuv though...

Thanks for the scripts I think I'll get a clear picture of how it works and how the different statussus can be derived. Btw who created the status code? Ludde? or is it a general torrent thing? Someone must know what all the bits stand for right?

Newayz, the first post is kinda updated. I'm gona work on compatibility on torrentnames with a ' in it now.


-= FAQ Guides Manual Help =-
Everything about the Webui!

Offline

 

#15 2006-10-16 07:46:49

Pleh
Member

Re: mIRC script

No problem, if you need anything else just let me know.

I believe Ludde created the status code.


Creator of the FlashUI

Add the awesome power of Flash to the awsome power of uTorrent and you get something so good you will find it hard not to pee your pants!

Offline

 

#16 2006-10-16 08:52:51

ICleolion
Member

Re: mIRC script

Ok, i think the thing i was misunderstanding was the definition of "queued".  I originally thought it meant the torrent was actually queued, but now it makes sense if i think of it as the torrent being in the torrent queue, and not necessarily currently queued waiting to start.

Last edited by ICleolion (2006-10-16 08:58:08)


One of these days... POW RIGHT IN THE KISSER

Offline

 

#17 2006-10-16 09:47:17

Pleh
Member

Re: mIRC script

smile


Creator of the FlashUI

Add the awesome power of Flash to the awsome power of uTorrent and you get something so good you will find it hard not to pee your pants!

Offline

 

#18 2006-10-17 05:59:55

Lord Alderaan
Member

Re: mIRC script

Ok guys, I think I have an acceptably working version running now.

Free for use guys. You wanna copy, adjust, modify, be inspired by, wipe ur ass with or simply use this script go right ahead. No need for credit as long as you don't act like you made it (alone).

Special thanks to Ludde (utorrent), ICleolion (statusthingy), Sylf (statusthingy), Pleh (statusthingy (still have to try flashui)) and silverfire (Criticism concerning GTSDLL).


xOMG! I didn't intend this post to sound like I achieved a major accomplishment... ah well

Last edited by Lord Alderaan (2006-10-17 06:01:23)


-= FAQ Guides Manual Help =-
Everything about the Webui!

Offline

 

#19 2006-10-17 11:10:59

ICleolion
Member

Re: mIRC script

lol i didnt do anything, but congrats smile


One of these days... POW RIGHT IN THE KISSER

Offline

 

#20 2007-06-13 01:41:01

c1oUd
Member

Re: mIRC script

PHP.

Code:

function ParseStatus($code/*1*/, $done/*4*/){
    $flag = false;
    if ($code & 1){ //Started
        if ($code & 32){ //paused
            $rtrn = 'Paused';  
            $flag = true;
        } else { //seeding or leeching
            if ($code & 64){ //queued
                $rtrn = ($done == 1000) ? 'Seeding' : 'Downloading';
                $flag = true; 
            } else {
                $rtrn = ($done == 1000) ? 'Seeding [F]' : 'Downloading [F]';
                $flag = true; 
            }
        }
    } else if ($code & 2){ //checking
        $rtrn = 'Checking';
        $flag = true; 
    } else if ($code & 16){ //error
        $rtrn = 'Error';
        $flag = true; 
    } else if ($code & 64){ //queued
        $rtrn = 'Queued';
        $flag = true; 
    }
    if (($done == 1000) && (!$flag)) {$rtrn = 'Finished';}
    if (($done < 1000) && (!$flag)) {$rtrn = 'Stopped';}
    return $rtrn;
}

Last edited by c1oUd (2007-06-13 17:07:08)

Offline

 

#21 2007-06-28 16:12:51

Ryan Norton
µTorrent Developer

Re: mIRC script

If anyone is curious 4 is start after check, 8 is checked, and 128 is loaded.

Offline

 

#22 2007-06-29 03:18:43

Lord Alderaan
Member

Re: mIRC script

Thanks!! Now we can write a 100% correct status thing.

1 = Started
2 = Checking
4 = Start after Check
8 = Checked
16 = Error
32 = Paused
64 = Queued
128 = Loaded

Ah I see Ultima made a sticky with the information gathered over the months in different topics. Although it isn't a real API if you can manage making custom http connections (which does mean its cross platform) in your programming language you can employ this information to create your own (user/automation) interface, although with limited functionality:

http://forum.utorrent.com/viewtopic.php?id=25661

Last edited by Lord Alderaan (2007-06-29 03:28:19)


-= FAQ Guides Manual Help =-
Everything about the Webui!

Offline

 

#23 2008-02-02 09:20:24

saivert
Member

Re: mIRC script

I like this script but you should set /utchan to disabled by default. This can easily be exploited by other users to make you flood a channel with useless µTorrent stats until you get kicked by anti-flood bots or some operator. Actually the feature is pretty useless from the start. Just leave it a QUERY based command only.

The only purpose for this is to to be able to quickly check your own downloading box via IRC. Nothing else. I'm sick and tired of useless stats, pc hardware lists and Winamp now playing junk that people spam channels on IRC with. If I want to know what a person downloads I can just ask him about it. In a personal tone.

Also offer a color code free version of the script. Many channels block color codes because frankly they are annoying.

I just used the script and modified it to use /echo instead of /msg, as I'm only using this for my own interest and not for annoying people in public channels.

Offline

 

#24 2008-02-05 16:02:12

Lord Alderaan
Member

Re: mIRC script

Its more an example / usable core then a ready to use script (it is pretty much ready to use though). Thats why I listed it under the developers header in the everything about webui topic.smile


-= FAQ Guides Manual Help =-
Everything about the Webui!

Offline

 

#25 2008-02-29 05:00:24

jama
Member

Re: mIRC script

Is it only my imagination or does this script not work with uTorrent 1.7.6 and 1.7.7? 1.7.5 worked fine, but as soon as I upgraded to 1.7.6 and later 1.7.7 it didn't work anymore (12[µT] Torrents: 0 (Seed:0, Leech:0, Inactive:0). 0B/s down, 0B/s up. Ratio: 0 Remaining: 0B is all i get)

Offline

 

Board footer

Powered by FluxBB