--- deliantra/server/socket/info.C 2007/11/08 19:43:29 1.47 +++ deliantra/server/socket/info.C 2008/08/29 02:07:10 1.51 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team * Copyright (©) 1992,2007 Frank Tore Johansen * @@ -141,10 +141,7 @@ * * flags is various flags - mostly color, plus a few specials. * - * pri is priority. It is a little odd - the lower the value, the more - * important it is. Thus, 0 gets sent no matter what. Otherwise, the - * value must be less than the listening level that the player has set. - * Unfortunately, there is no clear guideline on what each level does what. + * pri is unused. * * pl can be passed as NULL - in fact, this will be done if NDI_ALL is set * in the flags. @@ -158,16 +155,13 @@ if (flags & NDI_ALL) { for_all_players (pl) - new_draw_info (flags & ~NDI_ALL, pri, pl->ob, buf); + new_draw_info (flags & ~NDI_ALL, 0, pl->ob, buf); } else { if (!op || !op->contr || !op->contr->ns) return; - if (pri >= op->contr->listening) - return; - if ((flags & (NDI_COLOR_MASK | NDI_UNIQUE)) != NDI_BLACK || !op->contr->ns->msg_suppressed (buf)) print_message (flags & NDI_COLOR_MASK, op, buf); @@ -202,9 +196,6 @@ if (!pl || (pl->type != PLAYER) || (pl->contr == NULL)) return; - if (pri >= pl->contr->listening) - return; - if (!CLIENT_SUPPORT_READABLES (pl->contr->ns, type)) { char *buf = (char *) malloc (strlen (oldmessage == NULL ? message : oldmessage) + 1); @@ -231,9 +222,6 @@ if (!pl || (pl->type != PLAYER) || (pl->contr == NULL)) return; - if (pri >= pl->contr->listening) - return; - if (!CLIENT_SUPPORT_READABLES (pl->contr->ns, type)) { va_list ap; @@ -265,7 +253,7 @@ new_info_map_except (int color, maptile * map, object *op, const char *str) { for_all_players (pl) - if (pl->ob != NULL && pl->ob->map == map && pl->ob != op) + if (pl->ob->map == map && pl->ob != op) new_draw_info (color, 0, pl->ob, str); } @@ -276,7 +264,7 @@ new_info_map_except2 (int color, maptile * map, object *op1, object *op2, const char *str) { for_all_players (pl) - if (pl->ob != NULL && pl->ob->map == map && pl->ob != op1 && pl->ob != op2) + if (pl->ob->map == map && pl->ob != op1 && pl->ob != op2) new_draw_info (color, 0, pl->ob, str); } @@ -287,7 +275,7 @@ new_info_map (int color, maptile * map, const char *str) { for_all_players (pl) - if (pl->ob != NULL && pl->ob->map == map) + if (pl->ob->map == map) new_draw_info (color, 0, pl->ob, str); } @@ -488,20 +476,3 @@ free (map_mark); } -/** - * Send a kill log record to sockets - */ -void -Log_Kill (const char *Who, const char *What, int WhatType, const char *With, int WithType) -{ - size_t len; - char buf[MAX_BUF]; - - if (With != NULL) - snprintf (buf, MAX_BUF, "%s\t%s\t%d\t%s\t%d\n", Who, What, WhatType, With, WithType); - else - snprintf (buf, MAX_BUF, "%s\t%s\t%d\n", Who, What, WhatType); - - len = strlen (buf); -} -