summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/clif.c12
2 files changed, 14 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index db8bf9051..9c8d45b60 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/01/29
+ * Added a nasty hack to prevent multilanguage clients from breaking guild notices
2007/01/27
* Made @reloadscript wipe ALL previous mobs that the script engine spawned
- this way it is manageable via global vars; the other way doesn't allow that
diff --git a/src/map/clif.c b/src/map/clif.c
index fe0c5a1f6..f10f1a043 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10545,6 +10545,18 @@ void clif_parse_GuildChangeNotice(int fd,struct map_session_data *sd) {
if(!sd->state.gmaster_flag)
return;
+ // compensate for the client's double marker bug (in both strings)
+ if ((RFIFOB(fd, 6) == '|') && (RFIFOB(fd, 6+3) == '|')) {
+ memmove(RFIFOP(fd, 6+3), RFIFOP(fd, 6+6), 60-6); memset(RFIFOP(fd, 60-3), 0x00, 3); // drop the duplicate marker
+ }
+ if ((RFIFOB(fd, 66) == '|') && (RFIFOB(fd, 66+3) == '|')) {
+ memmove(RFIFOP(fd, 66+3), RFIFOP(fd, 66+6), 180-6); memset(RFIFOP(fd, 180-3), 0x00, 3); // drop the duplicate marker
+ }
+ // compensate for the client's adding of an extra space at the end of the message
+ if (RFIFOB(fd, 66) == '|') {
+ memset(RFIFOP(fd, 66 + strnlen(RFIFOP(fd, 66), 120)-1), 0x00, 1); // delete extra space at the end
+ }
+
guild_change_notice(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6),(char*)RFIFOP(fd,66));
}