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