diff options
author | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-24 22:23:34 +0000 |
---|---|---|
committer | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-24 22:23:34 +0000 |
commit | 7f7c0c4e31a17c9ae854f9460ccd34b4b5698f90 (patch) | |
tree | 5d3a0c05d31a63e1c623b2f367110684d7b6bd58 /src/char_sql | |
parent | 2147c872e095f32b81433fbdd54a98763180d5ee (diff) | |
download | hercules-7f7c0c4e31a17c9ae854f9460ccd34b4b5698f90.tar.gz hercules-7f7c0c4e31a17c9ae854f9460ccd34b4b5698f90.tar.bz2 hercules-7f7c0c4e31a17c9ae854f9460ccd34b4b5698f90.tar.xz hercules-7f7c0c4e31a17c9ae854f9460ccd34b4b5698f90.zip |
- Updated to most of jA's 1067
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@351 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/char.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 2d54d21ce..571495a31 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1976,6 +1976,7 @@ int lan_ip_check(unsigned char *p){ int parse_char(int fd) { int i, ch = 0; char email[40]; + unsigned short cmd; struct char_session_data *sd; unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr; @@ -1992,10 +1993,29 @@ int parse_char(int fd) { sd = session[fd]->session_data; while(RFIFOREST(fd) >= 2) { -// if (RFIFOW(fd, 0) < 30000) -// printf("parse_char : %d %d %x\n", fd, RFIFOREST(fd), RFIFOW(fd, 0)); + cmd = RFIFOW(fd,0); + // crc32�̃X�L�b�v�p + if( sd==NULL && // �����O�C��or�Ǘ��p�P�b�g + RFIFOREST(fd)>=4 && // �Œ�o�C�g������ �� 0x7530,0x7532�Ǘ��p�P���� + RFIFOREST(fd)<=21 && // �ő�o�C�g������ �� �T�[�o�[���O�C������ + cmd!=0x20b && // md5�ʒm�p�P�b�g���� + (RFIFOREST(fd)<6 || RFIFOW(fd,4)==0x65) ){ // ���ɉ����p�P�b�g�����Ă�Ȃ�A�ڑ��łȂ��Ƃ��� + RFIFOSKIP(fd,4); + cmd = RFIFOW(fd,0); + printf("parse_char : %d crc32 skipped\n",fd); + if(RFIFOREST(fd)==0) + return 0; + } - switch(RFIFOW(fd, 0)) { +// if(cmd<30000 && cmd!=0x187) +// printf("parse_char : %d %d %d\n",fd,RFIFOREST(fd),cmd); + + // �s���p�P�b�g�̏��� +// if (sd == NULL && cmd != 0x65 && cmd != 0x20b && cmd != 0x187 && +// cmd != 0x2af8 && cmd != 0x7530 && cmd != 0x7532) +// cmd = 0xffff; // �p�P�b�g�_���v��\�������� + + switch(cmd){ case 0x20b: //20040622 encryption ragexe correspondence if (RFIFOREST(fd) < 19) return 0; |