diff options
author | Haru <haru@dotalux.com> | 2019-08-26 01:38:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-26 01:38:26 +0200 |
commit | 29e6bbef1b7d4c2434cc6bc8e7a0226227ec6281 (patch) | |
tree | 2a87caab4d2a26e279af63dd02871f6553021449 /src/map/atcommand.c | |
parent | dae5933998758c4fcf8a7dde452d34a3b8fd052c (diff) | |
parent | 0f5da8e9f5ef70c9d2e845c1e69e2b2024094ee9 (diff) | |
download | hercules-29e6bbef1b7d4c2434cc6bc8e7a0226227ec6281.tar.gz hercules-29e6bbef1b7d4c2434cc6bc8e7a0226227ec6281.tar.bz2 hercules-29e6bbef1b7d4c2434cc6bc8e7a0226227ec6281.tar.xz hercules-29e6bbef1b7d4c2434cc6bc8e7a0226227ec6281.zip |
Merge pull request #2522 from MishimaHaruna/remove-inter-roundtrips
Remove some round-trips to the inter-server
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2fac5b4a4..22969606d 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1107,8 +1107,10 @@ ACMD(kami) sscanf(message, "%199[^\n]", atcmd_output); if (stristr(info->command, "l") != NULL) clif->broadcast(&sd->bl, atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP); + else if (info->command[4] == 'b' || info->command[4] == 'B') + clif->broadcast(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, BC_BLUE, ALL_CLIENT); else - intif->broadcast(atcmd_output, (int)strlen(atcmd_output) + 1, (*(info->command + 4) == 'b' || *(info->command + 4) == 'B') ? BC_BLUE : BC_YELLOW); + clif->broadcast(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, BC_YELLOW, ALL_CLIENT); } else { if(!*message || (sscanf(message, "%10u %199[^\n]", &color, atcmd_output) < 2)) { clif->message(fd, msg_fd(fd,981)); // Please enter color and message (usage: @kamic <color> <message>). @@ -1119,7 +1121,7 @@ ACMD(kami) clif->message(fd, msg_fd(fd,982)); // Invalid color. return false; } - intif->broadcast2(atcmd_output, (int)strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); + clif->broadcast2(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0, ALL_CLIENT); } return true; } @@ -5125,7 +5127,7 @@ ACMD(broadcast) } safesnprintf(atcmd_output, sizeof(atcmd_output), "%s: %s", sd->status.name, message); - intif->broadcast(atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT); + clif->broadcast(NULL, atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT, ALL_CLIENT); return true; } @@ -8263,7 +8265,7 @@ ACMD(request) } safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,278), message); // (@request): %s - intif->wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output); + pc->wis_message_to_gm(sd->status.name, PC_PERM_RECEIVE_REQUESTS, atcmd_output); clif_disp_onlyself(sd, atcmd_output); clif->message(sd->fd,msg_fd(fd,279)); // @request sent. return true; |