ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/request.C
(Generate patch)

Comparing deliantra/server/socket/request.C (file contents):
Revision 1.28 by root, Wed Dec 13 18:51:50 2006 UTC vs.
Revision 1.29 by root, Wed Dec 13 21:27:09 2006 UTC

961 /* these are old dxclients */ 961 /* these are old dxclients */
962 /* Version 1024 added support for singular + plural name values - 962 /* Version 1024 added support for singular + plural name values -
963 * requiing this minimal value reduces complexity of that code, and it 963 * requiing this minimal value reduces complexity of that code, and it
964 * has been around for a long time. 964 * has been around for a long time.
965 */ 965 */
966 if (!strcmp (" CF DX CLIENT", cp) || ns->sc_version < 1024) 966 if (ns->sc_version < 1026)
967 { 967 {
968 sprintf (version_warning, "drawinfo %d %s", NDI_RED, 968 sprintf (version_warning, "drawinfo %d %s", NDI_RED,
969 "**** VERSION WARNING ****\n**** CLIENT IS TOO OLD!! UPDATE THE CLIENT!! ****"); 969 "**** VERSION WARNING ****\n**** CLIENT IS TOO OLD!! UPDATE THE CLIENT!! ****");
970 Write_String_To_Socket (ns, version_warning, strlen (version_warning)); 970 Write_String_To_Socket (ns, version_warning, strlen (version_warning));
971 } 971 }
2354{ 2354{
2355 SockList sl (MAXSOCKBUF); 2355 SockList sl (MAXSOCKBUF);
2356 sl << "replyinfo skill_info\n"; 2356 sl << "replyinfo skill_info\n";
2357 2357
2358 for (int i = 1; i < NUM_SKILLS; i++) 2358 for (int i = 1; i < NUM_SKILLS; i++)
2359 sl.len += sprintf ((char *)sl.buf + sl.len, "%d:%s\n", i + CS_STAT_SKILLINFO, &skill_names[i]); 2359 sl.printf ("%d:%s\n", i + CS_STAT_SKILLINFO, &skill_names[i]);
2360 2360
2361 if (sl.len >= MAXSOCKBUF) 2361 if (sl.len >= MAXSOCKBUF)
2362 { 2362 {
2363 LOG (llevError, "Buffer overflow in send_skill_info!\n"); 2363 LOG (llevError, "Buffer overflow in send_skill_info!\n");
2364 fatal (0); 2364 fatal (0);
2378 SockList sl (MAXSOCKBUF); 2378 SockList sl (MAXSOCKBUF);
2379 2379
2380 sl << "replyinfo spell_paths\n"; 2380 sl << "replyinfo spell_paths\n";
2381 2381
2382 for (int i = 0; i < NRSPELLPATHS; i++) 2382 for (int i = 0; i < NRSPELLPATHS; i++)
2383 sl.len += sprintf ((char *)sl.buf + sl.len, "%d:%s\n", 1 << i, spellpathnames[i]); 2383 sl.printf ("%d:%s\n", 1 << i, spellpathnames[i]);
2384 2384
2385 if (sl.len >= MAXSOCKBUF) 2385 if (sl.len >= MAXSOCKBUF)
2386 { 2386 {
2387 LOG (llevError, "Buffer overflow in send_spell_paths!\n"); 2387 LOG (llevError, "Buffer overflow in send_spell_paths!\n");
2388 fatal (0); 2388 fatal (0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines