Browse Source

* Enabled atcommand parsing for clients with Korean langtype and version.

modified   Changelog-Trunk.txt
modified   src/map/atcommand.c
modified   src/map/charcommand.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9393 54d463be-8e91-2dee-dedb-b68131a5f0ec
Lance 18 years ago
parent
commit
90352e92a2
3 changed files with 5 additions and 2 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 2 1
      src/map/atcommand.c
  3. 2 1
      src/map/charcommand.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/12/02
 2006/12/02
+	* Enabled atcommand parsing for clients with Korean langtype and version. [Lance]
 	* Added missing min/max definitions to cbasetypes.h, needed for the @send change. [FlavioJS]
 	* Added missing min/max definitions to cbasetypes.h, needed for the @send change. [FlavioJS]
 	* Replaced @send with the version I use for testing packets.
 	* Replaced @send with the version I use for testing packets.
 	  Can display the packet length. Supports dynamic packets, quoted strings 
 	  Can display the packet length. Supports dynamic packets, quoted strings 

+ 2 - 1
src/map/atcommand.c

@@ -849,6 +849,7 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message) {
 			s_flag = 1;
 			s_flag = 1;
 		str++;
 		str++;
 	}
 	}
+
 	if (!*str)
 	if (!*str)
 		return AtCommand_None;
 		return AtCommand_None;
 
 
@@ -871,7 +872,7 @@ AtCommandType atcommand(struct map_session_data* sd, const int level, const char
 		return AtCommand_None;
 		return AtCommand_None;
 	}
 	}
 
 
-	if (*p == command_symbol) { // check first char.
+	if (*p == command_symbol || (p[0] == '|' && p[3] == command_symbol)) { // check first char, try to skip |00 (or something else) [Lance]
 		char command[101];
 		char command[101];
 		int i = 0;
 		int i = 0;
 		malloc_set(info, 0, sizeof(AtCommandInfo));
 		malloc_set(info, 0, sizeof(AtCommandInfo));

+ 2 - 1
src/map/charcommand.c

@@ -190,6 +190,7 @@ is_charcommand(const int fd, struct map_session_data* sd, const char* message) {
 			s_flag = 1;
 			s_flag = 1;
 		str++;
 		str++;
 	}
 	}
+
 	if (!*str)
 	if (!*str)
 		return CharCommand_None;
 		return CharCommand_None;
 
 
@@ -212,7 +213,7 @@ CharCommandType charcommand(struct map_session_data* sd, const int level, const
 		return CharCommand_None;
 		return CharCommand_None;
 	}
 	}
 
 
-	if (*p == command_symbol) { // check first char.
+	if (*p == command_symbol || (p[0] == '|' && p[3] == command_symbol)) { // check first char, try to skip |00 (or something else) [Lance]
 		char command[101];
 		char command[101];
 		int i = 0;
 		int i = 0;
 		malloc_set(info, 0, sizeof(CharCommandInfo));
 		malloc_set(info, 0, sizeof(CharCommandInfo));