diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-29 16:02:57 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-29 16:02:57 +0000 |
commit | 49d458f73eb18df9ba960e2e8a60db81fa638044 (patch) | |
tree | 34d8d4492eb33abb0a5f962dd0761420677d11e9 /src/map/clif.c | |
parent | e1b078f81273298d23cce7da3261feefb035f0ce (diff) | |
download | hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.tar.gz hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.tar.bz2 hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.tar.xz hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.zip |
Added a nasty hack to prevent multilanguage clients from breaking guild notices
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9737 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 12 |
1 files changed, 12 insertions, 0 deletions
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)); } |