From 92ba7ee3b19bc4151d69700e9b1b5484298cbcbf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 Mar 2015 19:42:28 +0300 Subject: Fix translation server messages. Allow send correct command to client for join irc channel if enabled. --- src/map/atcommand.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 00ffb44..7f4c779 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -20,7 +20,23 @@ const char* eatcommand_msgsd(struct map_session_data *sd, int *msgPtr) { const int msg_number = *msgPtr; if (!(msg_number >= 0 && msg_number < MAX_MSG)) + { + hookStop(); return "??"; + } + if (*msgPtr == 1435) + { + hookStop(); + // service message, must be not translated + return "You're now in the '#%s' channel for '%s'"; + } + else if (*msgPtr == 1403) + { + hookStop(); + // service message, must be not translated + return "You're now in the '#%s' channel for '-'"; + } + hookStop(); return lang_pctrans(atcommand->msg_table[0][msg_number], sd); } @@ -30,6 +46,10 @@ const char* eatcommand_msgfd(int *fdPtr, int *msgPtr) const int fd = *fdPtr; struct map_session_data *sd = session_isValid(fd) ? session[fd]->session_data : NULL; if (!(msg_number >= 0 && msg_number < MAX_MSG)) + { + hookStop(); return "??"; + } + hookStop(); return lang_pctrans(atcommand->msg_table[0][msg_number], sd); } -- cgit v1.2.3-70-g09d2