Welcome Guest | RSS
dccinfo - mIRC Land
Home | dccinfo - mIRC Land | Sign Up | Log In
To skip the ad click continue and skip
 
[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
Forum moderator: Wikked 
mIRC Land » mIRC Scripts » mIRC User (User-Wise) Scripts » dccinfo (dccinfo)
dccinfo
WikkedDate: Monday, 09/01/2017, 1:19:11 AM | Message # 1
I Own This
Group: Moderators
Messages: 4
Reputation: 0
Status: Offline
;place in remotes, then right click in channel or query. xD

Code

alias dccinfo {
  var %dcc.gets = $get(0)
  var %dcc.sends = $send(0)
  var %inc.count = 1
  var %cursend = $null
  var %tmp.done = 0
  var %tmp.fail = 0
  var %tmp.get = 0
  var %tmp.send = 0
  var %tmp.speed = 0
  var %pack.speed = 0

  if ($1 == help) {
    echo -a syntax: /dccinfo gets [short] or /dccinfo sends or /dccinfo
    echo -a /dccinfo will present a summary of current sends and/or gets (if any) into the channel
    echo -a /dccinfo gets will present a full list of current (if any) dcc gets into the channel
    echo -a /dccinfo gets short will present a summary of current (if any) dcc gets into the channel
    echo -a /dccinfo sends will present a full list of current (if any) dcc sends into the channel
  }
  if ($1 == $null) {
    while (%inc.count <= %dcc.gets) {
      if ($get(%inc.count).status == received) { inc %tmp.done }
      if ($get(%inc.count).status == failed) { inc %tmp.fail }
      if ($get(%inc.count).status == active) { inc %tmp.get | var %tmpcurget = $addtok(%tmpcurget, %inc.count, 64) }
      inc %inc.count
    }
    var %inc.count = 1
    while (%inc.count <= %dcc.sends) {
      if ($send(%inc.count).status == active) { inc %tmp.send | var %tmpcursend = $addtok(%tmpcursend, %inc.count, 64) }
      if ($send(%inc.count).status == failed) { inc %tmp.fail }
      if ($send(%inc.count).status == received) { inc %tmp.done }
      inc %inc.count
    }  
    echo -a Current DCC Info: GETS: %tmp.get ++ SENDS: %tmp.send ++ Completed: %tmp.done ++ Failed: %tmp.fail
    if ((%tmp.send != 0) || (%tmp.get != 0)) { msg $active $me is doing:  $+ %tmp.get $+  DCC Gets and  $+ %tmp.send $+  DCC Sends. }
    var %tmp.get.speed = 0
    var %tmp.send.speed = 0
    var %tmp.inc.count = 1
    while ( %tmp.inc.count <= $numtok(%tmpcurget,64)) {
      %tmp.get.speed = $calc(%tmp.get.speed + $round($calc($get($gettok(%tmpcurget, %tmp.inc.count, 64)).cps / 1024),2))
      inc %tmp.inc.count
    }
    var %tmp.inc.count = 1
    while (%tmp.inc.count <= $numtok(%tmpcursend,64)) {
      var %tmp.send.speed = $calc(%tmp.send.speed + $round($calc($send($gettok(%tmpcursend, %tmp.inc.count, 64)).cps / 1024),2))
      inc %tmp.inc.count
    }
    if (%tmp.send > 0) { msg $active Total DCC Send Speed $+ $chr(91) $+ s $+ $chr(93) $+ :  $+ %tmp.send.speed KB/s $+  }
    if (%tmp.get > 0 ) { msg $active Total DCC Get Speed $+ $chr(91) $+ s $+ $chr(93) $+ :  $+ %tmp.get.speed KB/s $+  }
  }
  if ($1 == both) {
    while (%inc.count <= %dcc.gets) {
      if ($get(%inc.count).status == active) {
        var %cursend = $addtok(%cursend,%inc.count,64)
        inc %tmp.get
      }
      inc %inc.count
    }
    if (%tmp.get > 0) {
      msg $active $me is currently doing:  $+ %tmp.get $+  DCC Gets:
      var %tmp.inc.count = 1
      while (%tmp.inc.count <= $numtok(%cursend,64)) {
        msg $active DCC Get $chr(35) $+ %tmp.inc.count $+ $chr(58) $chr(91) $+ $get($gettok(%cursend, %tmp.inc.count, 64)).pc $+ $chr(37) Completed $+ $chr(93)  $+ $get($gettok(%cursend, %tmp.inc.count, 64)).file $+  @ $round($calc($get($gettok(%cursend, %tmp.inc.count,64)).cps / 1024),2) KB/s
        var %tmp.speed = $calc(%tmp.speed + $round($calc($get($gettok(%cursend, %tmp.inc.count,64)).cps / 1024),2))
        inc %tmp.inc.count

      }
      msg $active Total Speed: %tmp.speed KB/s
    }
    if (%tmp.get == 0) {
      echo -a There is no current dcc get xfers. do /dccinfo on it's own to check for status. kthxbai.
    }
    var %inc.count = 0
    while (%inc.count <= %dcc.sends) {
      if ($send(%inc.count).status == active) {
        var %cursend = $addtok(%cursend,%inc.count,64)
        inc %tmp.send
        //var %tmp.speed = %tmp.speed + $round($calc($get(%inc.count).cps / 1024),2)
      }
      inc %inc.count
    }
    if (%tmp.send > 0) {
      msg $active $me is currently doing:  $+ %tmp.send $+  DCC Sends
      var %tmp.inc.count = 1
      var %tmp.speed = 0
      while (%tmp.inc.count <= $numtok(%cursend,64)) {
        msg $active DCC Send $chr(35) $+ %tmp.inc.count $+ $chr(58) $chr(91) $+ $send($gettok(%cursend,%tmp.inc.count,64)).pc $+ $chr(37) Completed $+ $chr(93)  $+ $send($gettok(%cursend,%tmp.inc.count,64)).file to $send($gettok(%cursend,%tmp.inc.count,64)) $+  $chr(64)  $+ $round($calc($send($gettok(%cursend,%tmp.inc.count,64)).cps / 1024),2) KB/s $+ 
        var %tmp.speed = $calc(%tmp.speed + $round($calc($send($gettok(%cursend,%tmp.inc.count,64)).cps / 1024),2))
        inc %tmp.inc.count
      }
      msg $active Total Speed: %tmp.speed KB/s
    }

  }
  if ($1 == gets) {
    while (%inc.count <= %dcc.gets) {
      if ($get(%inc.count).status == active) {
        var %cursend = $addtok(%cursend,%inc.count,64)
        inc %tmp.get
      }
      inc %inc.count
    }
    if ($2 == short) {
      if (%tmp.get > 0) {

        var %tmp.inc.count = 1
        while (%tmp.inc.count <= $numtok(%cursend,64)) {
          var %tmp.speed = $calc(%tmp.speed + $round($calc($get($gettok(%cursend, %tmp.inc.count,64)).cps / 1024),2))
          inc %tmp.inc.count
        }
        msg $active $me is currently doing:  $+ %tmp.get $+  DCC Gets $chr(64) %tmp.speed KB/s
      }
      if (%tmp.get == 0) {
        echo -a There is no current dcc get xfers. do /dccinfo on it's own to check for status. kthxbai.
      }

      halt
    }
    if (%tmp.get > 0) {
      msg $active $me is currently doing:  $+ %tmp.get $+  DCC Gets:
      var %tmp.inc.count = 1
      while (%tmp.inc.count <= $numtok(%cursend,64)) {
        msg $active DCC Get $chr(35) $+ %tmp.inc.count $+ $chr(58) From $get(%tmp.inc.count) $chr(91) $+ $get($gettok(%cursend, %tmp.inc.count, 64)).pc $+ $chr(37) Completed $+ $chr(93)  $+ $get($gettok(%cursend, %tmp.inc.count, 64)).file $+  @ $round($calc($get($gettok(%cursend, %tmp.inc.count,64)).cps / 1024),2) KB/s
        var %tmp.speed = $calc(%tmp.speed + $round($calc($get($gettok(%cursend, %tmp.inc.count,64)).cps / 1024),2))
        inc %tmp.inc.count

      }
      msg $active Total Speed: %tmp.speed KB/s
    }
    if (%tmp.get == 0) {
      echo -a There is no current dcc get xfers. do /dccinfo on it's own to check for status. kthxbai.
    }
  }
  if ($1 == sends) {
    while (%inc.count <= %dcc.sends) {
      if ($send(%inc.count).status == active) {
        var %cursend = $addtok(%cursend,%inc.count,64)
        inc %tmp.send
        //var %tmp.speed = %tmp.speed + $round($calc($get(%inc.count).cps / 1024),2)
      }
      inc %inc.count
    }

    if (%tmp.send == 0) {
      echo -a There is no current dcc send xfers. do /dccinfo on it's own to check for status. kthxbai.
    }

    if (%tmp.send > 0) {
      msg $active $me is currently doing:  $+ %tmp.send $+  DCC Sends
      var %tmp.inc.count = 1
      var %tmp.speed = 0
      while (%tmp.inc.count <= $numtok(%cursend,64)) {
        msg $active DCC Send $chr(35) $+ %tmp.inc.count $+ $chr(58) $chr(91) $+ $send($gettok(%cursend,%tmp.inc.count,64)).pc $+ $chr(37) Completed $+ $chr(93)  $+ $send($gettok(%cursend,%tmp.inc.count,64)).file to $send($gettok(%cursend,%tmp.inc.count,64)) $+  $chr(64)  $+ $round($calc($send($gettok(%cursend,%tmp.inc.count,64)).cps / 1024),2) KB/s $+ 
        var %tmp.speed = $calc(%tmp.speed + $round($calc($send($gettok(%cursend,%tmp.inc.count,64)).cps / 1024),2))
        inc %tmp.inc.count
      }
      msg $active Total Speed: %tmp.speed KB/s
    }

  }
}

menu channel,query {
  dccinfo
  .Full Get:/dccinfo gets
  .Short Get:/dccinfo gets short
  .status:/dccinfo
  .Full Send:/dccinfo sends
  .Full Both:/dccinfo both
}
 
mIRC Land » mIRC Scripts » mIRC User (User-Wise) Scripts » dccinfo (dccinfo)
Page 1 of 11
Search:

Copyright MyCorp © 2017