Peace and Protection forum
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: statbrag addon bug
snottily
Newbie
*




Posts: 2
Registered: 12-8-2012
Member Is Offline


[*] posted on 12-8-2012 at 16:49
statbrag addon bug


the statbrag addon writes a file to the root of the drive P&P is installed on, on win7 it is called "Program" with the content:
[Files]
(x86)\PP2\ADDONS\Statbrag.ini=RecordUptime Date 06/09/2008
so it obviously can't deal with a path to the statbrag.ini that has a space in it (c:\Program Files (x86)\PP2\ADDONS)

problem is, win7 complains about that filename on boot.

any solution for this?
View user's profile View All Posts By User
solbu
Super Administrator
*********




Posts: 43
Registered: 3-10-2008
Location: EFNet, Libera, OFTC
Member Is Offline


[*] posted on 17-8-2012 at 04:44


Quote: Originally posted by snottily  
(x86)\PP2\ADDONS\Statbrag.ini=RecordUptime Date 06/09/2008

If you look carefully at the path, you will see that the script is PP2, and Not PnP. Besides we don't have that addon.

Since we have nothing to do with PP2, we can't help you.

[Edited on 17-8-2012 by solbu]




Using GNU/Linux, because its a matter of Freedom
View user's profile Visit user's homepage View All Posts By User
snottily
Newbie
*




Posts: 2
Registered: 12-8-2012
Member Is Offline


[*] posted on 19-8-2012 at 16:33
umm


PP2 is *my* chosen name for the Peace and Protection mIRC folder. Statbrag is a PnP addon, see screenshot.
[img]https://lh3.googleusercontent.com/-mP9QrpujlGs/UDD5ChLIyjI/AAAAAAAAfPo/G3a3OLyJK9w/s406/PnP+Addons+19.08.2012+163040.jpg[/img]
View user's profile View All Posts By User
kap
PnP Developer
***




Posts: 54
Registered: 6-8-2015
Member Is Offline


[*] posted on 27-9-2015 at 17:45


These are the addons that ship with Peace and Protection:

View user's profile View All Posts By User
kap
PnP Developer
***




Posts: 54
Registered: 6-8-2015
Member Is Offline


[*] posted on 9-1-2017 at 23:05


For those wondering about alternatives to using moo.dll to retrieve system information (from what I can gather is the case with StratBrag.ppa according to the picture provided) - one can use Windows Management Instrumentation through COM in mIRC.

Consider the following:


Code:
alias WMI.ComputerSystem.Name return $wmiget(Win32_ComputerSystem).Name alias WMI.OperatingSystem.Name return $gettok($wmiget(Win32_OperatingSystem).Name,1,124) alias WMI.OperatingSystem.Version return $wmiget(Win32_OperatingSystem).Version alias WMI.OperatingSystem.ServicePackMajorVersion return SP $+ $wmiget(Win32_OperatingSystem).ServicePackMajorVersion alias WMI.OperatingSystem.RegisteredUser return $wmiget(Win32_OperatingSystem).RegisteredUser alias WMI.OperatingSystem.OSArchitecture return $wmiget(Win32_OperatingSystem).OSArchitecture alias WMI.Processor.Name return $wmiget(Win32_Processor).Name ;WMI alias wmiget { .comopen a WbemScripting.SWbemLocator if ($comerr) { .comclose a return } .comclose a $com(a,ConnectServer,3,dispatch* b) if ($comerr) { return } .comclose b $com(b,ExecQuery,3,bstr*,select $prop from $1,dispatch* c) var %x $comval(c,$iif($2,$2,1),$prop) :error if ($com(a)) .comclose a if ($com(b)) .comclose b if ($com(c)) .comclose c return %x }


For those who want to explore this, have a look at Ford_Lawnmower's System Information script as found here: http://hawkee.com/snippet/7069/

[Edited on 9-1-2017 at 22:14 by kap]
View user's profile View All Posts By User
solbu
Super Administrator
*********




Posts: 43
Registered: 3-10-2008
Location: EFNet, Libera, OFTC
Member Is Offline


[*] posted on 10-1-2017 at 22:52


Quote: Originally posted by kap  
Consider the following:

You could consider making it an addon. :)




Using GNU/Linux, because its a matter of Freedom
View user's profile Visit user's homepage View All Posts By User
kap
PnP Developer
***




Posts: 54
Registered: 6-8-2015
Member Is Offline


[*] posted on 22-5-2017 at 21:04


I cooked something up. Given time I might polish and finish it, but here is some code. Save the following as sysinfo.ppa and place in your PnP addon folder:

Code:
; #= ppsysinfo -rs ; ######################################## ; Peace and Protection ; PnP SysInfo (standard addon) ; ######################################## #.ppa.info off [addon] name=SysInfo group=Extras popup=SysInfo author=acvxqs version=1.0 url= email= id=ppsysinfo ppver=4.22 config= help= unload= vars= vars2= windows= dialogs= timers= sockets= hashcid= hashpnp= [files] 1=sysinfo.ppa [other] 1= [notes] 1=This addon displays various system information. Use /ppsysinfo to run. [menu] 1= [query] 1= [channel] 1= #.ppa.info end on *:LOAD:{ ; PnP check if (!$_ispnp) { echo 4 -ati2 *** This addon requires Peace and Protection by pai to use. echo 4 -ati2 *** You can download Peace and Protection at http://www.kristshell.net/pnp/ .timer -mio 1 0 .unload -rs " $+ $script $+ " halt } ; Invalid load method check if (!$istok($_cfgx(addons,ids),$readini($script,n,addon,id),32)) { .timer -mio 1 0 .unload -rs " $+ $script $+ " dispa Unloading ' $+ $script $+ ' $chr(40) $+ addon is not properly loaded; use /addon to load it $+ $chr(41) halt } } alias ppsysinfo { var %t = 1 var %todo = Processor,BaseBoard,PhysicalMemory,LogicalDisk,DiskDrive,VideoController,SoundDevice,NetworkAdapter,Printer,Battery,OperatingSystem var %Processor = Caption,Manufacturer,CurrentClockSpeed,ExtClock,L2CacheSize,AddressWidth,SocketDesignation,ProcessorId,LoadPercentage var %BaseBoard = Manufacturer,Product,Version var %PhysicalMemory = Name,Capacity,BankLabel,FormFactor,MemoryType var %LogicalDisk = Name,Description,FileSystem,VolumeName,Size,VolumeSerialNumber,SystemName var %DiskDrive = Model,MediaType,Size,Partitions,InterfaceType,TotalSectors,BytesPerSector,TotalTracks,SectorsPerTrack,TotalCylinders,TracksPerCylinder,TotalHeads var %VideoController = Caption,VideoProcessor,AdapterRAM,VideoMemoryType,VideoArchitecture,AdapterDACType,CurrentHorizontalResolution,CurrentVerticalResolution,CurrentBitsPerPixel,CurrentRefreshRate,CurrentScanMode,InstalledDisplayDrivers,DriverVersion,DriverDate var %SoundDevice = Caption,Manufacturer,DeviceID var %NetworkAdapter = Description,Manufacturer,MACAddress,ServiceName,TimeOfLastReset var %Printer = Caption,PortName,PrinterStatus,HorizontalResolution,VerticalResolution,PrintProcessor var %Battery = Caption,DeviceID,EstimatedRunTime,EstimatedChargeRemaining var %OperatingSystem = Caption,OSArchitecture,Version,ServicePackMajorVersion,BuildNumber,BuildType,NumberOfProcesses,FreePhysicalMemory,FreeVirtualMemory,TotalVirtualMemorySize,InstallDate,BootDevice,RegisteredUser var %win = @SysInfo if ($window(%win)) window -c %win _window 2.2 -hnlkv -t40,120 %win -1 -1 -1 -1 %win iline %win 1 Systeminformation while ($gettok(%todo,%t,44)) { var %do = $ifmatch var %win32 = Win32_ $+ %do .comopen Locator WbemScripting.SWbemLocator noop $com(Locator,ConnectServer,3, dispatch* Services) .comclose Locator noop $com(Services, InstancesOf,3,string,%win32,dispatch* Instances) .comclose Services noop $com(Instances,Count,3) aline %win %do $+ $chr(9) $+ Information $+ $chr(9) $+ Value var %n = $com(Instances).result var %m = 1 while (%m <= %n) { var %item = $eval(% $+ %do,2) var %num = $numtok(%item,44) var %x = 1 aline %win %do %m while (%x <= %num) { aline %win $chr(9) $+ $gettok(%item,%x,44) $+ $chr(9) $+ $comval(Instances, %m, $gettok(%item,%x,44)) inc %x } inc %m } .comclose Instances inc %t } window -a %win }


Caveat:
There's no com error checking. Also there's no way yet to filter information and say to channel/query.

[Edited on 22-5-2017 at 20:07 by kap]
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2017 The XMB Group