diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-05 19:57:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-05 19:57:34 +0300 |
commit | 4bbed18ded183c528aebdf3918d63e06b6896821 (patch) | |
tree | 1dfd2103624a4e4e3585b60dff20db2745beaeca /src/emap/atcommand.c | |
parent | 5c7857eac4512a38cd02843d377430e4a33697af (diff) | |
download | evol-hercules-4bbed18ded183c528aebdf3918d63e06b6896821.tar.gz evol-hercules-4bbed18ded183c528aebdf3918d63e06b6896821.tar.bz2 evol-hercules-4bbed18ded183c528aebdf3918d63e06b6896821.tar.xz evol-hercules-4bbed18ded183c528aebdf3918d63e06b6896821.zip |
Override server gm command @mapexit.s20160706
New format: @mapexit [code]
This command will terminate map server and return status code with value 'code'.
If code missing it return 0.
Diffstat (limited to 'src/emap/atcommand.c')
-rw-r--r-- | src/emap/atcommand.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/emap/atcommand.c b/src/emap/atcommand.c index b7acb4a..7c3f345 100644 --- a/src/emap/atcommand.c +++ b/src/emap/atcommand.c @@ -129,3 +129,14 @@ ACMD2(slide) unit->movepos(&sd->bl, x, y, 1, 0); return true; } + +ACMD1(mapExit) +{ + int code = 0; + if (!*message || sscanf(message, "%5d", &code) < 1) + code = 0; + + map->retval = code; + map->do_shutdown(); + return true; +} |