Guest User

Untitled

a guest
May 23rd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 5.71 KB | None | 0 0
  1. menu channel,status {
  2.   System Info
  3.   .$iif(!$chan,$style(2)) Public
  4.   ..All: allinfo say
  5.   ..OS-Memory: say $osinfo  
  6.   ..MotherBoard-CPU: say $cpuinfo $moboinfo
  7.   ..Network: say $netinfo
  8.   ..Video: say $videoinfo
  9.   ..Disk Drives: say $diskinfo
  10.   .Private
  11.   ..All: allinfo echo
  12.   ..OS-Memory: echo -a $osinfo
  13.   ..MotherBoard-CPU: echo -a $cpuinfo $moboinfo
  14.   ..Network: echo -a $netinfo
  15.   ..Video: echo -a $videoinfo
  16.   ..Disk Drives: echo -a $diskinfo
  17. }
  18. alias -l allinfo {
  19.   $1- 6S14ystem 12I14nfo: $cpuinfo  $osinfo $videoinfo $moboinfo
  20.   $1- 6S14ystem 12I14nfo: $netinfo $diskinfo
  21. }
  22. alias -l cpuinfo {
  23.   .comopen Processor WbemScripting.SWbemLocator
  24.   if (!$comerr) {
  25.     if ($com(Processor, ConnectServer, 3, dispatch* Specs)) {
  26.       if ($com(Specs, Get, 3, string, Win32_Processor.DeviceID='CPU0', dispatch* Results)) {
  27.         var %manufacturer, %name, %caption, %clockspeed, %load, %architecture
  28.         if ($com(Results, Manufacturer, 3)) { %manufacturer = $com(Results).result }
  29.         if ($com(Results, Name, 3)) { %name = $com(Results).result }
  30.         if ($com(Results, Caption, 3)) { %caption = $com(Results).result }
  31.         if ($com(Results, CurrentClockSpeed, 3)) { %clockspeed = $com(Results).result }
  32.         if ($com(Results, LoadPercentage, 3)) { %load = $com(Results).result }
  33.         if ($com(Results, Architecture, 3)) { %architecture = $com(Results).result }
  34.         .comclose Results
  35.       }
  36.       .comclose Specs
  37.     }
  38.     .comclose Processor
  39.     $iif($isid,return,$iif(# ischan,say,echo -a)) 6C14PU:6 %manufacturer %name  %caption $+(%load,%) Load
  40.   }
  41.   else { echo -st Com Error $nopath($script) | .comclose Processor | return }
  42. }
  43. alias -l osinfo {
  44.   if (!$com(Wbem.2)) { WbemOpen }
  45.   var %TotalMemory 6T14otal 6M14emory:6 $round($calc($WbemGet(Win32_OperatingSystem,TotalVisibleMemorySize,1)/1024),2)
  46.   var %FreeMemory 6A14vailable 6M14emory:6 $round($calc($WbemGet(Win32_OperatingSystem,FreePhysicalMemory,1)/1024),2)
  47.   var %OSCaption 6O14S:6 $WbemGet(Win32_OperatingSystem,Caption,1)
  48.   var %OSVersion $WbemGet(Win32_OperatingSystem,Version,1)
  49.   var %OSArchitecture $WbemGet(Win32_OperatingSystem,OSArchitecture,1)
  50.   if ($com(Wbem.2)) { .comclose Wbem.2 }
  51.   $iif($isid,return,$iif(# ischan,say,echo -a)) %OSCaption %OSVersion %OSArchitecture 6U14ptime:6 $uptime(system,1) $+(%TotalMemory,MB) $+(%FreeMemory,MB)
  52. }
  53. alias -l moboinfo {
  54.   if (!$com(Wbem.2)) { WbemOpen }
  55.   var %Aname 6A14udio:6 $WbemGet(Win32_SoundDevice,Name,1)  
  56.   var %Description $WbemGet(Win32_BaseBoard,Description,1)
  57.   var %Manufacturer $WbemGet(Win32_BaseBoard,Manufacturer,1)
  58.   if ($com(Wbem.2)) { .comclose Wbem.2 }
  59.   $iif($isid,return,$iif(# ischan,say,echo -a)) 6M14OBO:6 %Manufacturer %Description %Aname 
  60. }
  61. alias -l netinfo {
  62.   if (!$com(Wbem.2)) { WbemOpen }
  63.   var %BytesReceived $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesReceivedPerSec,1)
  64.   %BytesReceived = 6R14eceived:6 $bytes($calc(%BytesReceived + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesReceivedPerSec,2))).suf
  65.   var %BytesSent $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesSentPerSec,1)
  66.   %BytesSent = 6S14ent:6 $bytes($calc(%BytesSent + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesSentPerSec,2))).suf
  67.   var %BytesTotal $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesTotalPerSec,1)
  68.   %BytesTotal = 6T14otal:6 $bytes($calc(%BytesTotal + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesTotalPerSec,2))).suf
  69.   var %Bandwidth $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,CurrentBandwidth,1)
  70.   %Bandwidth = 6B14andwidth:6 $calc(%Bandwidth + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,CurrentBandwidth,2)/100000)
  71.   var %Name $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,Name,1)
  72.   %Name = $+(%Name,14/6,$WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,Name,2))
  73.   if ($com(Wbem.2)) { .comclose Wbem.2 }
  74.   $iif($isid,return,$iif(# ischan,say,echo -a)) 6N14etwork:6 %Name $+(%Bandwidth,KBps) %BytesReceived %BytesSent %BytesTotal 
  75. }
  76. alias -l videoinfo {
  77.   if (!$com(Wbem.2)) { WbemOpen }
  78.   var %Compatibility $WbemGet(Win32_VideoController,AdapterCompatibility,1)
  79.   var %VideoProcessor $WbemGet(Win32_VideoController,VideoProcessor,1)
  80.   var %AdapterRam $WbemGet(Win32_VideoController,AdapterRam,1)
  81.   var %Horizontal $WbemGet(Win32_VideoController,currenthorizontalresolution,1)
  82.   var %Vertical $WbemGet(Win32_VideoController,currentverticalresolution,1)
  83.   var %Bits $WbemGet(Win32_VideoController,currentbitsperpixel,1)
  84.   var %Refresh $WbemGet(Win32_VideoController,currentrefreshrate,1)
  85.   if ($com(Wbem.2)) { .comclose Wbem.2 }  
  86.   $iif($isid,return,$iif(# ischan,say,echo -a)) 6V14ideo:6 %Compatibility %VideoProcessor $+($bytes(%AdapterRam,3),MB) $+(%Horizontal,x,%Vertical) $+(%Bits,bit) $+(%Refresh,Hz)
  87. }
  88. alias -l DiskInfo {
  89.   var %d $disk(0),%total 0,%free 0,%result
  90.   while (%d) {
  91.     if ($disk(%d).size) {
  92.       %total = $calc(%total + $disk(%d).size)
  93.       %free = $calc(%free + $disk(%d).free)
  94.       %result = %result 6I14D:6 $disk(%d).label $disk(%d).path 6T14ype:6 $disk(%d).type 6S14ize:6 $bytes($disk(%d).size,g3).suf 6F14ree:6 $bytes($disk(%d).free,g3).suf 
  95.     }
  96.     dec %d
  97.   }
  98.   $iif($isid,return,$iif(# ischan,say,echo -a)) %Result 6T14otal 6D14isk 6S14pace:6 $bytes(%Total,g3).suf 6T14otal 6S14pace 6F14ree:6 $bytes(%free,g3).suf 
  99. }  
  100. alias -l WbemOpen {
  101.   .comopen Wbem.1 WbemScripting.SWbemLocator
  102.   .comclose Wbem.1 $com(Wbem.1,ConnectServer,3,dispatch* Wbem.2)
  103. }
  104. alias -l WbemGet {
  105.   if ($com(Wbem.3)) { .comclose Wbem.3 }
  106.   if ($com(Wbem.2,ExecQuery,3,bstr*,select $2 from $1,dispatch* Wbem.3)) { var %Result $comval(Wbem.3,$3,$2) }
  107.   .comclose Wbem.3
  108.   return %Result
  109. }
Add Comment
Please, Sign In to add comment