summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-12-03 19:54:23 -0700
committerFate <fate-tmw@googlemail.com>2008-12-03 19:54:23 -0700
commit1efdef1c054419ba1a0c8ee8836c5737228d579a (patch)
tree4a61d2d814122dc160f4a4ea66a15c2f58506cae /src/map/clif.c
parent28677f9e8071015f65a81254232d12da6393f144 (diff)
downloadtmwa-1efdef1c054419ba1a0c8ee8836c5737228d579a.tar.gz
tmwa-1efdef1c054419ba1a0c8ee8836c5737228d579a.tar.bz2
tmwa-1efdef1c054419ba1a0c8ee8836c5737228d579a.tar.xz
tmwa-1efdef1c054419ba1a0c8ee8836c5737228d579a.zip
GM commands can now be logged (specify a filename as gm_log in map_athena.conf). Added @log and @tee and @l and @t commands at level 60.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 426ee53..2858e50 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7501,6 +7501,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
}
}
+
/*==========================================
*
*------------------------------------------
@@ -7632,7 +7633,14 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <
int clif_message(struct block_list *bl, char* msg)
{
unsigned short msg_len = strlen(msg) + 1;
- unsigned char buf[256];
+ static int buf_len = -1;
+ static unsigned char *buf = NULL;
+
+ if (buf_len < msg_len) {
+ if (buf)
+ free(buf);
+ buf = malloc(buf_len = (msg_len + 16));
+ }
nullpo_retr(0, bl);