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

Comparing deliantra/server/server/c_misc.C (file contents):
Revision 1.29 by root, Mon Dec 25 14:43:23 2006 UTC vs.
Revision 1.31 by root, Wed Dec 27 09:28:02 2006 UTC

40 char buf[MAX_BUF], map_path[MAX_BUF]; 40 char buf[MAX_BUF], map_path[MAX_BUF];
41 long sec = time (0); 41 long sec = time (0);
42 42
43 new_draw_info_format (NDI_UNIQUE, 0, op, "Current time is: %02ld:%02ld:%02ld.", (sec % 86400) / 3600, (sec % 3600) / 60, sec % 60); 43 new_draw_info_format (NDI_UNIQUE, 0, op, "Current time is: %02ld:%02ld:%02ld.", (sec % 86400) / 3600, (sec % 3600) / 60, sec % 60);
44 new_draw_info (NDI_UNIQUE, 0, op, "Path Pl PlM IM TO Dif Reset"); 44 new_draw_info (NDI_UNIQUE, 0, op, "Path Pl PlM IM TO Dif Reset");
45 for (m = first_map; m != NULL; m = m->next)
46 {
47 45
46 for_all_maps (m)
47 {
48 if (search && strstr (m->path, search) == NULL) 48 if (search && !strstr (m->path, search))
49 continue; /* Skip unwanted maps */ 49 continue; /* Skip unwanted maps */
50
50 /* Print out the last 18 characters of the map name... */ 51 /* Print out the last 18 characters of the map name... */
51 if (strlen (m->path) <= 18) 52 if (strlen (m->path) <= 18)
52 strcpy (map_path, m->path); 53 strcpy (map_path, m->path);
53 else 54 else
54 strcpy (map_path, m->path + strlen (m->path) - 18); 55 strcpy (map_path, m->path + strlen (m->path) - 18);
56
55 sprintf (buf, "%-18.18s %2d %2d %1d %4d %2d %02d:%02d:%02d", 57 sprintf (buf, "%-18.18s %2d %2d %1d %4d %2d %02d:%02d:%02d",
56 map_path, m->players, players_on_map (m, FALSE), 58 map_path, m->players, players_on_map (m, FALSE),
57 m->in_memory, m->timeout, m->difficulty, 59 m->in_memory, m->timeout, m->difficulty,
58 (MAP_WHEN_RESET (m) % 86400) / 3600, (MAP_WHEN_RESET (m) % 3600) / 60, MAP_WHEN_RESET (m) % 60); 60 (m->reset_time % 86400) / 3600, (m->reset_time % 3600) / 60, m->reset_time % 60);
59 new_draw_info (NDI_UNIQUE, 0, op, buf); 61 new_draw_info (NDI_UNIQUE, 0, op, buf);
60 } 62 }
61} 63}
62 64
63/* This command dumps the body information for object *op. 65/* This command dumps the body information for object *op.
155 157
156 if (QUERY_FLAG (op, FLAG_WIZ)) 158 if (QUERY_FLAG (op, FLAG_WIZ))
157 { 159 {
158 new_draw_info_format (NDI_UNIQUE, 0, op, 160 new_draw_info_format (NDI_UNIQUE, 0, op,
159 "players:%d difficulty:%d size:%dx%d start:%dx%d timeout %ld", 161 "players:%d difficulty:%d size:%dx%d start:%dx%d timeout %ld",
160 m->players, m->difficulty, m->width, m->height, MAP_ENTER_X (m), MAP_ENTER_Y (m), MAP_TIMEOUT (m)); 162 m->players, m->difficulty, m->width, m->height, m->enter_x, m->enter_y, m->timeout);
161 163
162 } 164 }
163 if (m->msg) 165 if (m->msg)
164 new_draw_info (NDI_UNIQUE, NDI_NAVY, op, m->msg); 166 new_draw_info (NDI_UNIQUE, NDI_NAVY, op, m->msg);
165} 167}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines