This function removes a whole section from an .ini file.
- bool DeleteIniSection( string file, string section )
- file - The name of the .ini file
- section - The section which should be deleted
- function onPlayerCommand( player, cmd, text )
- if ( cmd == "delsection" )
- if ( text ) DeleteIniSection( text, player.Name );
This will delete the section labeled as the players name in the given ini file.
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
These functions are provided by the official module lu_ini.