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.30 by root, Mon Dec 25 14:54:44 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 (m->reset_time % 86400) / 3600, (m->reset_time % 3600) / 60, m->reset_time % 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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines