summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-01 21:57:53 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-01 21:57:53 +0000
commit3f930b2176fb290ce7f23fce9b3c1e4016c4485b (patch)
tree226ba3e4b265fdca72f5967be5654e5eee3bbce4 /src/map/atcommand.c
parentd4b1eab9ed53639253ebad548422a2bf09c9b2ea (diff)
downloadhercules-3f930b2176fb290ce7f23fce9b3c1e4016c4485b.tar.gz
hercules-3f930b2176fb290ce7f23fce9b3c1e4016c4485b.tar.bz2
hercules-3f930b2176fb290ce7f23fce9b3c1e4016c4485b.tar.xz
hercules-3f930b2176fb290ce7f23fce9b3c1e4016c4485b.zip
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
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c18
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.
**/