summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-19 12:38:25 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-19 12:38:25 +0000
commit3a20af5477f778a3bbbf4970818b48fbd126bbbe (patch)
tree2927720456f7c78fcab80011117941e147a017bd
parentdfe15c95cf66e20e6b35bcd882a3b39835b6fa55 (diff)
downloadhercules-3a20af5477f778a3bbbf4970818b48fbd126bbbe.tar.gz
hercules-3a20af5477f778a3bbbf4970818b48fbd126bbbe.tar.bz2
hercules-3a20af5477f778a3bbbf4970818b48fbd126bbbe.tar.xz
hercules-3a20af5477f778a3bbbf4970818b48fbd126bbbe.zip
Fixed `/lb` and `/nlb` commands displaying additional nickname (bugreport:5351).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15615 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/atcommand.c10
-rw-r--r--src/map/clif.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 7899be131..13d285d61 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1215,17 +1215,17 @@ ACMD_FUNC(kami)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if(*(command + 5) != 'c' && *(command + 5) != 'C') {
-
if (!message || !*message) {
clif_displaymessage(fd, "Please, enter a message (usage: @kami <message>).");
return -1;
}
sscanf(message, "%199[^\n]", atcmd_output);
- intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0);
-
+ if (strstr(command, "l") != NULL)
+ clif_broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, ALL_SAMEMAP);
+ else
+ intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0);
} else {
-
if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) {
clif_displaymessage(fd, "Please, enter color and message (usage: @kamic <color> <message>).");
return -1;
@@ -1235,7 +1235,6 @@ ACMD_FUNC(kami)
clif_displaymessage(fd, "Invalid color.");
return -1;
}
-
intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0);
}
return 0;
@@ -8370,6 +8369,7 @@ void atcommand_basecommands(void) {
ACMD_DEF(kami),
ACMD_DEF2("kamib", kami),
ACMD_DEF2("kamic", kami),
+ ACMD_DEF2("lkami", kami),
ACMD_DEF(heal),
ACMD_DEF(item),
ACMD_DEF(item2),
diff --git a/src/map/clif.c b/src/map/clif.c
index 3e45e7edb..8ac893916 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11078,7 +11078,7 @@ void clif_parse_LocalBroadcast(int fd, struct map_session_data* sd)
// as the length varies depending on the command used, just block unreasonably long strings
len = mes_len_check(msg, len, CHAT_SIZE_MAX);
- sprintf(command, "@localbroadcast %s", msg);
+ sprintf(command, "@lkami %s", msg);
is_atcommand(fd, sd, command, 1);
}