From 3f930b2176fb290ce7f23fce9b3c1e4016c4485b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 1 May 2012 21:57:53 +0000 Subject: Added @accinfo atcommand. "Huge thanks to"/"Credits to" Dekamaster/Nightroad <3. All the queries are handled by char-server. You might notice there is a odd way to retrieve job names in char server, this is only temporary until we're done arguing what'd be the best way to do it in char and map server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16025 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/map/atcommand.c') 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 )."); + 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. **/ -- cgit v1.2.3-70-g09d2