IPv4 Fremnet Logo
TOOLS, TINKERINGS & CODE

Do you use my code?

Node Usage · Mar 13, 23:39 by Shannon Wynter

This script has been rendered useless by recent MUM upgrades – The new version is Node Usage 2 this version is still here for historical purposes

So, you’re a leet IRCer yet, you’ve seen this leeter dude with a script that spams the channel with his Internode usage statistics.

This is probably that script.

Step 1 = Download MUM
Go to http://users.on.net/~johnson/internode and grab the latest version

Step 2 = Configure MUM
Make sure it’s configured with the correct username and password, and has updated at least once before proceeding

Step 3 = Install the script
You have two options

  • You can go ALT+R and create a new script, copying and pasting the stuff below into it
  • You can grab the script from HERE, save it to your mIRC dir and type /load -rs nodeusage.ini

The latter is the better option because it will make sure that you get the colour codes.

  1. [script]  
  2. n0=;***************************************************  
  3. n1=;* NodeUsage Version 0.61 **************************  
  4. n2=;***************************************************  
  5. n3=;* Writen by Freman aka Fremean                    *  
  6. n4=;***************************************************  
  7. n5=;*    Please send comments/complaints to:          *  
  8. n6=;*          fremscript@priya.2y.net                *  
  9. n7=;* Note: Anything else won't even be opened, and   *  
  10. n8=;* spamming, selling, or sending junk to this addr *  
  11. n9=;* will cause me to close it without a 2nd thought *  
  12. n10=;* So, do the right thing and don't fuck it up for *  
  13. n11=;* someone who needs it for legit purposes.        *  
  14. n12=;***************************************************  
  15. n13=;* To catch me look for Freman/Fremean on Undernet *  
  16. n14=;* If I'm online and around, I'll get back to you  *  
  17. n15=;* Home Chan(s): #LinuxSupport, #Freak, and #Love  *  
  18. n16=;* Other Frequented Chan(s): #Australia            *  
  19. n17=;***************************************************  
  20. n18=  
  21. n19=  
  22. n20=;***************************************************  
  23. n21=; EVENTS  
  24. n22=;***************************************************  
  25. n23=on *:LOAD: {  
  26. n24=  NodeUsage.Init  
  27. n25=}  
  28. n26=on *:UNLOAD: {  
  29. n27=  unset %NodeUsage.*  
  30. n28=}  
  31. n29=  
  32. n30=on *:DIALOG:NodeUsage.Setup:init:0: {  
  33. n31=  didtok $dname 8 46 Male.Female  
  34. n32=  if (%NodeUsage.Gender == his) {  
  35. n33=    did -c $dname 8 1  
  36. n34=  }  
  37. n35=  else {  
  38. n36=    did -c $dname 8 2  
  39. n37=  }  
  40. n38=  if (%NodeUsage.Averages == 1) {  
  41. n39=    did -c $dname 10  
  42. n40=  }  
  43. n41=}  
  44. n42=  
  45. n43=on *:DIALOG:NodeUsage.Setup:sclick:15: {  
  46. n44=  %NodeUsage.AppData = $did($dname,9)  
  47. n45=  if ($did($dname,8).sel == 1) {  
  48. n46=    %NodeUsage.Gender = his  
  49. n47=    %NodeUsage.Gender1 = he  
  50. n48=  }  
  51. n49=  else {  
  52. n50=    %NodeUsage.Gender1 = she  
  53. n51=    %NodeUsage.Gender = her  
  54. n52=  }  
  55. n53=  %NodeUsage.Averages = $did($dname,10).state  
  56. n54=}  
  57. n55=  
  58. n56=  
  59. n57=;***************************************************  
  60. n58=; ALIASES  
  61. n59=;***************************************************  
  62. n60=alias NodeUsage.RegRead {  
  63. n61=  var %a = regread $+ $ticks  
  64. n62=  .comopen %a WScript.Shell  
  65. n63=  if $comerr { return ERROR }  
  66. n64=  if !$com(%a,RegRead,3,bstr,$1) {  
  67. n65=    .comclose %a  
  68. n66=    return ERROR  
  69. n67=  }  
  70. n68=  var %b = $com(%a).result  
  71. n69=  .comclose %a  
  72. n70=  return OK %b  
  73. n71=}  
  74. n72=  
  75. n73=alias NodeUsage {  
  76. n74=  var %file = %NodeUsage.AppData $+ \Internode\InternodeUsage.txt  
  77. n75=  if ($exists(%file)) {  
  78. n76=    var %line = $read(%file,nf,1)  
  79. n77=    var %updated = $file(%file).mtime  
  80. n78=    var %used = $round($gettok(%line,1,32),2)  
  81. n79=    var %limit = $gettok(%line,2,32)  
  82. n80=    var %reset = $gettok(%line,3,32)  
  83. n81=    var %rduation = $duration($calc($ctime(01:01 %reset) - $ctime))  
  84. n82=    var %dration = $gettok(%rduation, $+(1-,$calc($numtok(%rduation,32)-1)),32)  
  85. n83=  
  86. n84=    var %daysinmonth = 31.x.31.30.31.30.31.31.30.31.30.31  
  87. n85=  
  88. n86=    if (%limit == 0) {  
  89. n87=      var %text = thanks god for flatrate as [ %NodeUsage.Gender2 ] has abused [ %NodeUsage.Gender ] connection and downloaded [ %used ] megs.  
  90. n88=    }  
  91. n89=    else {  
  92. n90=      if (%used > %limit) {  
  93. n91=        var %text = is over [ %NodeUsage.Gender ] %limit meg node usage limit by $calc(%used - %limit) megs, [ %dration ] till reset [Last Updated: $asctime(%updated,h:nn tt zz) $+ ]]  
  94. n92=      }  
  95. n93=      else {  
  96. n94=        var %remain = $calc(%limit - %used)  
  97. n95=        var %text = has [ %dration ] to use the remaining [ %remain megs ] of [ %NodeUsage.Gender ] %limit meg node usage limit [Last Updated: $asctime(%updated,h:nn tt zz) $+ ]]  
  98. n96=        if (%NodeUsage.Averages == 1) {  
  99. n97=          var %avgpast = $round($calc(($ctime(01:01 %reset) - $ctime)/24/60/60),0)  
  100. n98=          %avgpast = $round($calc(%remain / %avgpast),2)  
  101. n99=          %text = %text Average daily to end of month: %avgpast mb  
  102. n100=        }  
  103. n101=      }  
  104. n102=    }  
  105. n103=    /me %text  
  106. n104=  }  
  107. n105=  else {  
  108. n106=    echo Can't find InternodeUsage.txt  
  109. n107=  }  
  110. n108=}  
  111. n109=  
  112. n110=alias NodeUsage.Setup {  
  113. n111=  dialog -m NodeUsage.Setup NodeUsage.Dialog1  
  114. n112=}  
  115. n113=  
  116. n114=alias NodeUsage.Init {  
  117. n115=  echo 3 -as .................................  
  118. n116=  echo 3 -as . Node Usage V0.50 ..............  
  119. n117=  echo 3 -as ..................... by Freman .  
  120. n118=  echo 3 -as .................................  
  121. n119=  echo 3 -as .. Spam the current channel .....  
  122. n120=  echo 3 -as .............. with your usage ..  
  123. n121=  echo 3 -as .................................  
  124. n122=  echo 3 -as ..... Setting default vars. .....  
  125. n123=  echo 3 -as .................................  
  126. n124=  var %appdata $NodeUsage.RegRead(HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\AppData)  
  127. n125=  if ($gettok(%appdata,1,32) == OK) {  
  128. n126=    set %NodeUsage.AppData $gettok(%appdata,2-,32)  
  129. n127=  }  
  130. n128=  else {  
  131. n129=    set %NodeUsage.AppData Unable to locate 'Application Data' folder  
  132. n130=  }  
  133. n131=  set %NodeUsage.Gender his  
  134. n132=  set %NodeUsage.Gender2 he  
  135. n133=  set %NodeUsage.Averages = 1  
  136. n134=  NodeUsage.Setup  
  137. n135=}  
  138. n136=  
  139. n137=  
  140. n138=;***************************************************  
  141. n139=; ALIASES  
  142. n140=;***************************************************  
  143. n141=dialog -l NodeUsage.Dialog1 {  
  144. n142=  title "Node Usage Setup"  
  145. n143=  size -1 -1 200 62  
  146. n144=  option dbu  
  147. n145=  
  148. n146=  text "Gender:",3,1 2 40 10  
  149. n147=  text "The path to your 'Application Data' folder:",4,1 12 130 10  
  150. n148=  
  151. n149=  combo 8,42 1 50 10,drop  
  152. n150=  edit %NodeUsage.AppData,9,42 21 150 10,autohs  
  153. n151=  check "Display Averages",10,42 31 150 10  
  154. n152=  
  155. n153=  button  "OK", 15, 160 41 40 10, ok  
  156. n154=  button  "Cancel", 16, 160 51 40 10, cancel  
  157. n155=}  
  158.  
  159. Download this code: nodeusage.ini (Downloaded 175 time(s))

Step 4 = Configuring
You may or may not be prompted for confirmation that you want to run the start up commands, but if you are then the answer is YES. If you answer no here, do NOT email me and complain it doesn’t work.

Specify your gender, the path to your Application Data folder (the one that’s there is probably correct) and if you want to see the average monthly usage till end of month then check the “Display Averages” box.

Comments

Spam no more - rel=nofollow is active here, spamming my comments will not help your page rank.

  Textile help
---== Copyright Shannon Wynter - All rights reserved - All wrongs avenged ==---