mIRC Homepage
Posted By: starpossen Show current bandwidth usage - 31/07/06 11:51 PM
I know some scripts has this feature but those scripts includes alot of other stuff, and I would just like this part, I dont know if it's hard to make one, what I want it to do is:
Either by an alias or popup
showing the curent upstream and downstream in kB/s
and also the ability to choose only up stream or downstream.

I did search the forum, but did not find anything, so if I have missed a post then im sorry for making this one.
Posted By: DaveC Re: Show current bandwidth usage - 01/08/06 07:43 AM
Code:
;
;usage $cps or $cps(N), valid N values are 1 to 2 representing, 1 as downstream, 2 as upstream, any other value or no other value is considered both.
;
alias cps {
  var %g.cps = 0, %g = $get(0)  | while (%g) { var %g.cps = $calc(%cps + $get(%g).cps  | dec %g }
  var %s.cps = 0, %s = $send(0) | while (%s) { var %s.cps = $calc(%cps + $send(%s).cps | dec %s }
  return $calc($iif($1 != 2,%g.cps) + $iif($1 != 1,%s.cps))
}

* untested *

That should return Chracters per second, from there you can use $bytes() and get the result in what ever resolution of speed u like.
* I believe cps and bytes per second is some how considered different, but its very close if it is different.
Posted By: PhantasyX Re: Show current bandwidth usage - 01/08/06 08:26 PM
Do you mean show 'internet' bandwidth usage, not just your mIRC DCC tranfer usage?

There are several DLLs available, I personally use "band.dll" by XhaKeR.
I am able to give you a copy if you would like.

There are other ways/DLLs available to do this, but this is the easiest way I've found. =)
Posted By: starpossen Re: Show current bandwidth usage - 01/08/06 09:49 PM
PhantasyX, not my dcc bandwidth, but my internet bandwidth, and im very open to suggestions.
Posted By: viveknath Re: Show current bandwidth usage - 03/08/06 09:14 AM
hey....your code seem to not understanding to me...but i have see a chat room in http://www.devaswam.com
there the chat room uses a java script and my computer prompt me to install it .
Posted By: starpossen Re: Show current bandwidth usage - 03/08/06 02:59 PM
I looked at darkengine script and pulled out some code and did some editing:
Code:
alias totband { msg $active  $+  $+ Down $de(banddown)  kB/s  $+  $+ Up $de(bandup) kB/s }
alias tottrans { msg $active  $+  $+ Downloadet: $de(total_down) MB  $+  $+ Uploadet: $de(total_up) MB }

alias band { dem Downspeed $de(banddown) kB/s }
alias upband { dem Upspeed $de(bandup) kB/s }

alias totaldown { dem Total Downloaded: $de(total_down) $+ MB }
alias totalup { dem Total Uploaded: $de(total_up) $+ MB }

alias de { return $dll(darkenginex.dll,$1,_) }
alias det { if (key isin $1) { msg $active $remove($dll(darkenginex.dll,$1,$2-),$left($2,2)) } | else { dem  $+ $dll(darkenginex.dll,$1,$2-) } }
alias dem { msg $active  $+ $dek $+  $+ $1- } 

menu channel,query {
  -Bandwidth-
  .Upstream Usage:/upband
  .Downstream Usage :/band
  .Total Bandwidth Usage:/totband
  .Total Transferred:/tottrans
}

And it does what I need, so this ends my thread.
Thanks for the replys tho.
© mIRC Discussion Forums