EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=617)
-   -   Perl Script to pull out Command.cpp (https://www.eqemulator.org/forums/showthread.php?t=11889)

Monrezz 02-12-2004 02:10 PM

Perl Script to pull out Command.cpp
 
Don't suppose anyone has the time to write a small Perl script that would look in command.cpp and pull out every avaliable command from there, then export the list to addon.ini using the default values specified (in command.cpp)?

I notice addon.ini hasn't been updated for a while, yet a few new commands have been added.

Hmmm, don't think this is the right forum (not sure where really) but shucks it can be moved ;)

Monrezz

smogo 02-12-2004 02:55 PM

Code:

perl  -e 'while(<>){m/command_add\("(\w+)",.*,(\d+),.*$/ && print "!$1=$2\n"} ' command.cpp
should do it for most, while it does not handle #defines or variables, and some multi-line decls.

for the last command.cpp, got :
Quote:

!sendop=200
!setstat=200
!help=0
!version=0
!eitem=200
!setfaction=170
!serversidename=0
!testspawn=200
!testspawnkill=200
!wc=200
!numauths=200
!setanim=200
...
!ban=150
!oocmute=200
!revoke=200
!checklos=10
!los=0
186 lines


All times are GMT -4. The time now is 09:56 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.