summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 36944cd35..95e4b3471 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2738,22 +2738,17 @@ int parse_frommap(int fd)
break;
case 0x2b16: // Receive rates [Wizputer]
- if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
+ if( RFIFOREST(fd) < 14 )
return 0;
{
- char motd[256];
- char esc_motd[sizeof(motd)*2+1];
char esc_server_name[sizeof(server_name)*2+1];
- strncpy(motd, (char*)RFIFOP(fd,10), 255); //First copy it to make sure the motd fits.
- motd[255] = '\0';
- Sql_EscapeString(sql_handle, esc_motd, motd);
Sql_EscapeString(sql_handle, esc_server_name, server_name);
- if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d',`motd`='%s'",
- fd, esc_server_name, RFIFOW(fd,2), RFIFOW(fd,4), RFIFOW(fd,6), esc_motd) )
+ if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d'",
+ fd, esc_server_name, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)) )
Sql_ShowDebug(sql_handle);
- RFIFOSKIP(fd,RFIFOW(fd,8));
+ RFIFOSKIP(fd,14);
}
break;