summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 12:49:49 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 12:49:49 +0000
commitf20c6c19cda1c672ed93836ddd33ce8e08e104c9 (patch)
tree2191cdf38dc908565a7cc5e63c43cc627bdfd2bb /src/map/atcommand.c
parentc6ea185bd9ca1c3fdf7a18c4bf1e0b1150fffed5 (diff)
downloadhercules-f20c6c19cda1c672ed93836ddd33ce8e08e104c9.tar.gz
hercules-f20c6c19cda1c672ed93836ddd33ce8e08e104c9.tar.bz2
hercules-f20c6c19cda1c672ed93836ddd33ce8e08e104c9.tar.xz
hercules-f20c6c19cda1c672ed93836ddd33ce8e08e104c9.zip
* Removed commented-out code for check_fake_id()
* Merged improved/cleaned up (WiP) code for clif_parse_WisMessage * Removed the requirement to provide a character name in the message string when calling is_atcommand() (needed for the previous fix) - currently both ways work, but old will be removed in the upcoming command cleanup so please adjust your custom code if you use this! * Added clif_process_message(), an unified way to validate all four types of player message packets and retrieve their components * Applied the new checking function to clif code, this fixes various length mismatches caused by incomplete code in r11386 (bugreport:198) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11507 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index e6b1fd6e0..dd022b9c8 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -719,11 +719,15 @@ AtCommandType is_atcommand(const int fd, struct map_session_data* sd, const char
if (!message || !*message)
return AtCommand_None;
- str += strlen(sd->status.name);
- while (*str && (ISSPACE(*str) || (s_flag == 0 && *str == ':'))) {
- if (*str == ':')
- s_flag = 1;
- str++;
+ // temporary compatibility layer for previous implementation
+ if( *message != atcommand_symbol )
+ {
+ str += strlen(sd->status.name);
+ while (*str && (ISSPACE(*str) || (s_flag == 0 && *str == ':'))) {
+ if (*str == ':')
+ s_flag = 1;
+ str++;
+ }
}
if (!*str)