diff options
Diffstat (limited to 'src/emap/atcommand.c')
-rw-r--r-- | src/emap/atcommand.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/emap/atcommand.c b/src/emap/atcommand.c index e7f97b3..f71698f 100644 --- a/src/emap/atcommand.c +++ b/src/emap/atcommand.c @@ -243,7 +243,6 @@ ACMD0(log) ACMD4(tee) { clif->disp_overhead(&sd->bl, message, AREA_CHAT_WOC, NULL); - return true; } @@ -271,3 +270,22 @@ ACMD1(serverExit) return true; } + +ACMD1(getName) +{ + int id = 0; + if (!*message || sscanf(message, "%10d", &id) < 1) + return false; + + const struct block_list* bl = map->id2bl(id); + if (bl == NULL) + { + clif->message(fd, "Unit not found"); + } + else + { + clif->message(fd, status->get_name(bl)); + } + + return true; +} |