Added the possibility to use custom process return values
instead of hardcoded 0 (shutdown) or 2 (restart) to allow using them
for various custom external features / better handling.
This can be used through 4 commands in ".server" family:
- shutdown
- restart
- idleshutdown
- idlerestart
Those have from now on 2 arguments, where the second (return value)
is optional:
.server <command> <time> [return_value]
If return_value is not specified, default value (0 or 2) is used.
Signed-off-by: freghar <compmancz@gmail.com>
Set restart exist code for SIGINT singnal case.
Some code simplifications for original patch.
Related code cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Now db script command strings stored in `db_script_string (mangos_string like table). Text field `datatext` replace by int field `dataint` that store index in `db_script_string` table. Indexes must be 2000000000+ (for avoid conflicts with mangos_string indexes). Changes required DB support and SCRIPT_COMMAND_TALK will not work with old data until fixing in DB.
Including fix _SCallback for 3 params, triggred mode correct call for .cast back and .cast target.
Remove outdated code for support old 19421 (and ranks) implementation in client data.
Removed unnecessary database queries in some command handlers.
Replaced them with access to cached data or queries for only the needed data.
Move database access in gossip select code to less often called place.
Removed unnecessary database queries in some command handlers.
Replaced them with access to cached data or queries for only the needed data.
Move database access in gossip select code to less often called place.
Command must now ignore implicit self-targeted player as target.
And allow respawn all near creatures/go in this case.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
If no creature is selected, old behavior is used (respawn everything).
Thanks Seline for the diff.
Signed-off-by: freghar <compmancz@gmail.com>
(cherry picked from commit 6bbdffac9acb9c02a74be632b35a90f0bda3ccb0)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Some changes in creature targeting and work in case alive target. Help data updated.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Provided ChatHandler::GetName for player name/"console command" output dependent from chat/console command call.
* New function for check when command work result send to command target.
* Remove unrequired complexy in mangos string usage in some commands.
slit ban/baninfi/banlist/unban commands to subcommands (this allow write not full subcomand string ".ban acc ...".
Fixed crash at unexpected use .account in console.
Fixed hide .gm on by .gm online (renamed to .gm ingame)
Now console/RA uas same commads as used in chat if selected command marked as safe for console.
Some commands accessable only at console and have security level 4. See sql update for new command names.
Not all commands that safe (or can be modified to safe) for console allowed currently for use in console input, this will be fixed later.