mIRC Home    About    Download    Register    News    Help

Print Thread
#180613 12/07/07 01:03 AM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Anyone know how I could check my internet connection speed in mIRC?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Do you mean the speed being used? You can't just check connection speed. If you want to find your speed, you need to send/receive files to check speeds. That's the same thing that websites that tell you your speed do. Otherwise, you find out from your ISP.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
I just want to see if the people using my script are on dialup or broadband. Maybe I can check if they are using a phone modem or not?

Joined: Jul 2007
Posts: 19
O
Old Offline
Pikka bird
Offline
Pikka bird
O
Joined: Jul 2007
Posts: 19
I don't see how this could be applied to a script but, to answer your question, you'd have to send packets to and from the recipient, requiring them to have a script to respond to your packets sent.

I don't know exactly how to do it but, you'd need acknowledgment from the recipient.


http://www.CloudyOneStudios.com
irc.CloudyOneStudios.com:#CloudyOne
Joined: Jul 2006
Posts: 4,222
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,222
he can sends a file to himself


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
I can do that, how do I monitor it to see how fast their connection speed is? Where do I start looking for that?

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Maybe I manage to write something down later, check /help $get (and its properties) as a starting point.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: Wims
he can sends a file to himself


You cannot do that. Sends to yourself don't use internet bandwidth. It is based on your hard drive speed. Try sending yourself a large file (100+MB) and you'll see that it sends extremely fast.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: DJ_Sol
I can do that, how do I monitor it to see how fast their connection speed is? Where do I start looking for that?


You cannot monitor someone else's speed without their permission. And if you took the time to get their permission, then you could easily ask them what their speed is.


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
If I send a file to myself, the speed depends in fact on my upload capabilities (which I can manupulate by producing other upload). Wonder why. I am using a router in a "1-PC home network".
As this might not alway be the case, it's rendering the following quite useless smile

Notes:
Now it has grown a lot bigger than I originally intended, I added some comments, echo feedback and some plain error checking.
I made this stimulated by the OP - just to play arround a bit- therefore I'll add it here. Hardly will you be able to make others use something like this, or make them send the results back to you... And why be that long winded, why not exchange a file, or ask. However, I wrote this thingy - maybe it will help someone - most likely it will not wink
There is a $send(N).cps identifier, returning a current "average" of that send..., but I wanted to calculate it by myself grin
Why "at least 100kB"? To get a viable average value.

Problem:
Without much doubt, most users have "on send request" set to default, that is: "ask". And I have no idea how to start calculating the time after accepting the dcc get (there is no "on accept" event, or an "on send starts") -
but the calculated speed will only be correct if $sreq is set to "auto", which is quite unlikely...


Code:
alias dcc.test {
  ; ----- inform the tester of what will be going on (allow the user to abort this all)
  if ($input(To test the DCC speed of your current connection $+ $chr(44) please select a file (at least 100kB size) $& 
    located on your hard drive. $crlf $crlf $+ A copy of this file will be sent to you via DCC $+ $chr(44) $& 
    the copy will be removed directly after the transfer has finished. $crlf $crlf $+ Note: $qt(mirc.chm) is $&
    of suficient size $+ $chr(44) for instance.,ygid,Testing your DCC speed) == $true) {
    ; ----- select a file for speed test
    :1
    set %dcc.test.pathfile $sfile($gettok($mircdir,1,92),*.*,Test this file)
    if (%dcc.test.pathfile) {
      ; ----- file is smaller than 100kB: repeat the prompt, or abort the test
      if ($file($shortfn(%dcc.test.pathfile)).size < 102400) { 
        if ($input(The file selected: $crlf $+ $qt(%dcc.test.pathfile) $crlf $+ is of insufficient size: $&
          $bytes($file($shortfn(%dcc.test.pathfile)).size).suf $+ . $&
          $crlf $+ Please select a file of at least 100kB size!,ygwd,Error: File is too small) == $true) { goto 1 } 
        else { ECHO -a Test aborted. | return }
      }
    }
    ; ----- no file selected: repeat the prompt, or abort the test
    else {
      if ($input(You did not select a file. Please retry!,ygwd,Error: No file selected) == $true) { goto 1 }
      else { ECHO -a Test aborted. | return }
    }
    ; ----- file selected and size suficcient: enable the checking group
    .enable #dcc.connection.check
    ; ----- if the user is not in dcc trust, add him temporarily (for "limit auto get to trusted users")
    if (!$trust($me)) { set %dcc.test.temptrust on | dcc trust $ial($me) }
    ; ----- send the file selected
    dcc send $me $shortfn(%dcc.test.pathfile)
    set %dcc.test.file $mkfn($nopath(%dcc.test.pathfile))
    set %dcc.test.started $ctime
  }
  ; ----- test not confirmed
  else { ECHO -a Test not confirmed. }
}

; ----- group of dcc events for testing
#dcc.connection.check on
on *:FILERCVD:*: {
  ; ----- the file was sent to user oneself, its the test file
  if (($nick == $me) && ($nopath($filename) == %dcc.test.file)) {
    ; ----- calculate transfer speed (size over time)
    ECHO -a Test finished. The average DCC send speed was $&
      $round($calc($file($shortfn($filename)).size / $calc($ctime - %dcc.test.started) / 1024),1) kB/s.
    dcc.test.end $shortfn($filename)
  }
}

on *:GETFAIL:*: { 
  ; ----- the file was sent to user oneself, its the test file
  if (($nick == $me) && ($nopath($filename) == %dcc.test.file)) {
    ECHO -a Test failed.
    dcc.test.end $shortfn($filename)
  }
}
#dcc.connection.check end

; ----- needed on both success and failure, therefore an alias
alias -l dcc.test.end {
  ; ----- restore dcc trust settings (if changed)
  if (%dcc.test.temptrust) { dcc trust -r $ial($me) }
  ; ----- remove the file sent for testing purposes
  .remove $1
  ; ----- close dcc get / send windows of the user oneself
  close -gs $me
  ; ----- remove the variables created for testing
  unset %dcc.test.*
  ; ----- disable the test group
  .disable #dcc.connection.check
}


Last edited by Horstl; 12/07/07 08:36 PM.
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Thank you for the hard work. Unfortunately dcc is not allowed on my network. I think I will do what Riamus said. If I have to ask them for permission to download a file to test speed, I might as well just ask them if they are using dialup or broadband.


Link Copied to Clipboard