- Fixed parse_names on irc.c crashing when receiving a null argument.
- Modified the parsing of the names line, since some servers will send @ instead of = when separating the information. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7750 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
c89acf814e
commit
8b0f535cec
@ -4,6 +4,10 @@ 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/07/19
|
2006/07/19
|
||||||
|
* Fixed parse_names on irc.c crashing when receiving a null argument.
|
||||||
|
[Skotlex]
|
||||||
|
* Modified the parsing of the names line, since some servers will send @
|
||||||
|
instead of = when separating the information. [Skotlex]
|
||||||
* Fixed the homun creation sql statement. Why noone else did so before?
|
* Fixed the homun creation sql statement. Why noone else did so before?
|
||||||
[Skotlex]
|
[Skotlex]
|
||||||
* When enabling/disabling hiding/unhiding an npc, if the npc is a warp, it
|
* When enabling/disabling hiding/unhiding an npc, if the npc is a warp, it
|
||||||
|
@ -371,12 +371,12 @@ int parse_names_packet(char *str) {
|
|||||||
memset(names,'\0',1024);
|
memset(names,'\0',1024);
|
||||||
|
|
||||||
tok=strtok(str,"\r\n");
|
tok=strtok(str,"\r\n");
|
||||||
sscanf(tok,":%255s %10s %255s = %255s :%1023[^\r\n]",source,numeric,target,channel,names);
|
sscanf(tok,":%255s %10s %255s %*1[=@] %255s :%1023[^\r\n]",source,numeric,target,channel,names);
|
||||||
if(strcmpi(numeric,"353")==0)
|
if(strcmpi(numeric,"353")==0)
|
||||||
parse_names(names);
|
parse_names(names);
|
||||||
|
|
||||||
while((tok=strtok(NULL,"\r\n"))!=NULL) {
|
while((tok=strtok(NULL,"\r\n"))!=NULL) {
|
||||||
sscanf(tok,":%255s %10s %255s = %255s :%1023[^\r\n]",source,numeric,target,channel,names);
|
sscanf(tok,":%255s %10s %255s %*1[=@] %255s :%1023[^\r\n]",source,numeric,target,channel,names);
|
||||||
if(strcmpi(numeric,"353")==0)
|
if(strcmpi(numeric,"353")==0)
|
||||||
parse_names(names);
|
parse_names(names);
|
||||||
}
|
}
|
||||||
@ -387,7 +387,7 @@ int parse_names_packet(char *str) {
|
|||||||
//User access level prefix parser [Zido]
|
//User access level prefix parser [Zido]
|
||||||
int parse_names(char *str) {
|
int parse_names(char *str) {
|
||||||
char *tok;
|
char *tok;
|
||||||
|
if (str == NULL) return 0; //Nothing to parse!
|
||||||
tok=strtok(str," ");
|
tok=strtok(str," ");
|
||||||
switch(tok[0]) {
|
switch(tok[0]) {
|
||||||
case '~':
|
case '~':
|
||||||
@ -433,7 +433,7 @@ int parse_names(char *str) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Store user's access level [Zido]
|
//Store user's access level [Zido]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user