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

Comparing deliantra/server/socket/info.C (file contents):
Revision 1.22 by root, Thu Dec 21 06:12:37 2006 UTC vs.
Revision 1.23 by root, Thu Dec 21 23:37:06 2006 UTC

83 83
84 if (!pl || (pl->type == PLAYER && pl->contr == NULL)) 84 if (!pl || (pl->type == PLAYER && pl->contr == NULL))
85 return; 85 return;
86 86
87 if (pl->type == PLAYER) 87 if (pl->type == PLAYER)
88 esrv_print_msg (pl->contr->socket, colr, (char *) tmp); 88 esrv_print_msg (pl->contr->ns, colr, (char *) tmp);
89} 89}
90 90
91/** 91/**
92 * Prints out the contents of specified buffer structures, 92 * Prints out the contents of specified buffer structures,
93 * and clears the string. 93 * and clears the string.
247 return; 247 return;
248 248
249 if (pri >= pl->contr->listening) 249 if (pri >= pl->contr->listening)
250 return; 250 return;
251 251
252 if (!CLIENT_SUPPORT_READABLES (pl->contr->socket, type)) 252 if (!CLIENT_SUPPORT_READABLES (pl->contr->ns, type))
253 { 253 {
254 char *buf = (char *) malloc (strlen (oldmessage == NULL ? message : oldmessage) + 1); 254 char *buf = (char *) malloc (strlen (oldmessage == NULL ? message : oldmessage) + 1);
255 255
256 if (buf == NULL) 256 if (buf == NULL)
257 LOG (llevError, "info::draw_ext_info -> Out of memory!"); 257 LOG (llevError, "info::draw_ext_info -> Out of memory!");
262 new_draw_info (flags, pri, pl, buf); 262 new_draw_info (flags, pri, pl, buf);
263 free (buf); 263 free (buf);
264 } 264 }
265 } 265 }
266 else 266 else
267 esrv_print_ext_msg (pl->contr->socket, flags & NDI_COLOR_MASK, type, subtype, message); 267 esrv_print_ext_msg (pl->contr->ns, flags & NDI_COLOR_MASK, type, subtype, message);
268} 268}
269 269
270void 270void
271draw_ext_info_format (int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *old_format, char *new_format, ...) 271draw_ext_info_format (int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *old_format, char *new_format, ...)
272{ 272{
277 return; 277 return;
278 278
279 if (pri >= pl->contr->listening) 279 if (pri >= pl->contr->listening)
280 return; 280 return;
281 281
282 if (!CLIENT_SUPPORT_READABLES (pl->contr->socket, type)) 282 if (!CLIENT_SUPPORT_READABLES (pl->contr->ns, type))
283 { 283 {
284 va_list ap; 284 va_list ap;
285 285
286 LOG (llevDebug, "Non supported extension text type for client.\n"); 286 LOG (llevDebug, "Non supported extension text type for client.\n");
287 va_start (ap, new_format); 287 va_start (ap, new_format);
296 296
297 va_start (ap, new_format); 297 va_start (ap, new_format);
298 vsnprintf (buf, HUGE_BUF, new_format, ap); 298 vsnprintf (buf, HUGE_BUF, new_format, ap);
299 va_end (ap); 299 va_end (ap);
300 strip_media_tag (buf); 300 strip_media_tag (buf);
301 esrv_print_ext_msg (pl->contr->socket, flags & NDI_COLOR_MASK, type, subtype, buf); 301 esrv_print_ext_msg (pl->contr->ns, flags & NDI_COLOR_MASK, type, subtype, buf);
302 } 302 }
303} 303}
304 304
305/** 305/**
306 * Writes to everyone on the map *except* op. This is useful for emotions. 306 * Writes to everyone on the map *except* op. This is useful for emotions.
614 614
615 for (int y = ymin; y <= ymax; y++) 615 for (int y = ymin; y <= ymax; y++)
616 for (int x = xmin; x <= xmax; x++) 616 for (int x = xmin; x <= xmax; x++)
617 sl << uint8 (map_mark[x + MAGIC_MAP_SIZE * y] & ~FACE_FLOOR); 617 sl << uint8 (map_mark[x + MAGIC_MAP_SIZE * y] & ~FACE_FLOOR);
618 618
619 pl->contr->socket->send_packet (sl); 619 pl->contr->ns->send_packet (sl);
620 620
621 free (map_mark); 621 free (map_mark);
622} 622}
623 623
624/** 624/**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines