diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-10-30 21:58:07 +0000 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-10-30 21:58:07 +0000 |
commit | 3bbe5345b398b1970c5cb7313bee3fb7d114f599 (patch) | |
tree | 782b5fb29fea3815fdacd1c27e202daa77c71579 | |
parent | 6185c5ea25de645d17bb342e9637075f35212ff6 (diff) | |
parent | 5a732b6d4b6240f3cb8926ecdd3eef2201998bc5 (diff) | |
download | plugin-3bbe5345b398b1970c5cb7313bee3fb7d114f599.tar.gz plugin-3bbe5345b398b1970c5cb7313bee3fb7d114f599.tar.bz2 plugin-3bbe5345b398b1970c5cb7313bee3fb7d114f599.tar.xz plugin-3bbe5345b398b1970c5cb7313bee3fb7d114f599.zip |
Merge branch 'tee_log' into 'master's20181102
Implemented commands tee and log
See merge request evol/evol-hercules!10
-rw-r--r-- | src/emap/atcommand.c | 12 | ||||
-rw-r--r-- | src/emap/atcommand.h | 12 | ||||
-rw-r--r-- | src/emap/init.c | 2 |
3 files changed, 25 insertions, 1 deletions
diff --git a/src/emap/atcommand.c b/src/emap/atcommand.c index 32ed750..e7f97b3 100644 --- a/src/emap/atcommand.c +++ b/src/emap/atcommand.c @@ -235,6 +235,18 @@ ACMD1(mapExit) return true; } +ACMD0(log) +{ + return true; +} + +ACMD4(tee) +{ + clif->disp_overhead(&sd->bl, message, AREA_CHAT_WOC, NULL); + + return true; +} + // 100 - terminate all servers // 101 - restart all servers // 102 - restart char and map servers diff --git a/src/emap/atcommand.h b/src/emap/atcommand.h index 24e4a4c..5b8588b 100644 --- a/src/emap/atcommand.h +++ b/src/emap/atcommand.h @@ -9,6 +9,10 @@ const char* eatcommand_msgsd_pre(struct map_session_data **sdPtr, const char* eatcommand_msgfd_pre(int *fdPtr, int *msgPtr); +#define ACMD0(x) bool atcommand_ ## x (const int fd __attribute__ ((unused)), \ + struct map_session_data* sd __attribute__ ((unused)), \ + const char* command __attribute__ ((unused)), \ + const char* message __attribute__ ((unused)), struct AtCommandInfo *info __attribute__ ((unused))) #define ACMD1(x) bool atcommand_ ## x (const int fd __attribute__ ((unused)), \ struct map_session_data* sd __attribute__ ((unused)), \ const char* command __attribute__ ((unused)), \ @@ -23,6 +27,11 @@ const char* eatcommand_msgfd_pre(int *fdPtr, const char* command __attribute__ ((unused)), \ const char* message __attribute__ ((unused)), \ struct AtCommandInfo *info __attribute__ ((unused))) +#define ACMD4(x) bool atcommand_ ## x (const int fd __attribute__ ((unused)), \ + struct map_session_data* sd, \ + const char* command __attribute__ ((unused)), \ + const char* message, \ + struct AtCommandInfo *info __attribute__ ((unused))) ACMD2(setSkill); ACMD2(slide); @@ -30,6 +39,7 @@ ACMD3(hugo); ACMD3(linus); ACMD1(mapExit); ACMD1(serverExit); - +ACMD0(log); +ACMD4(tee); #endif // EVOL_MAP_ATCOMMAND diff --git a/src/emap/init.c b/src/emap/init.c index 75da76e..a12e1c5 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -105,6 +105,8 @@ HPExport void plugin_init (void) addAtcommand("serverexit", serverExit); addAtcommand("hugo", hugo); addAtcommand("linus", linus); + addAtcommand("tee", tee); + addAtcommand("log", log); addCPCommand("serverexit", serverExit); |