diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 691cf2560..cad37b28f 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8452,6 +8452,23 @@ ACMD_FUNC(new_mount) { return 0; } +ACMD_FUNC(accinfo) { + char query[NAME_LENGTH]; + + if (!message || !*message || strlen(message) > NAME_LENGTH ) { + clif_displaymessage(fd, "(usage: @accinfo/@accountinfo <account_id/char name>)."); + clif_displaymessage(fd, "You may search partial name by making use of '%' in the search, \"@accinfo %Mario%\" lists all characters whose name contain \"Mario\""); + return -1; + } + + //remove const type + safestrncpy(query, message, NAME_LENGTH); + + intif_request_accinfo( sd->fd, sd->bl.id, sd->group_id, query ); + + return 0; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -8695,6 +8712,7 @@ void atcommand_basecommands(void) { ACMD_DEF(delitem), ACMD_DEF(charcommands), ACMD_DEF(font), + ACMD_DEF(accinfo), /** * For Testing Purposes, not going to be here after we're done. **/ |