--- deliantra/server/ext/commands.ext 2008/04/15 14:21:04 1.67 +++ deliantra/server/ext/commands.ext 2008/09/08 18:34:35 1.68 @@ -49,7 +49,7 @@ $ob->speed_left ($ob->speed_left - 4); - $ob->send_msg ("c/who" => (join "\n\n", who_listing $ob->may ("extended_who"), $arg), cf::NDI_DK_ORANGE | cf::NDI_REPLY | cf::NDI_CLEAR | cf::NDI_DEF); + $ob->send_msg ("c/who" => (join "\r", who_listing $ob->may ("extended_who"), $arg), cf::NDI_DK_ORANGE | cf::NDI_REPLY | cf::NDI_CLEAR | cf::NDI_DEF); }; cf::register_command seen => sub { @@ -81,9 +81,9 @@ # Too hard to try and make a header that lines everything up, so just # give a description. (comment from C++) my $reply = - "The first column is the name of the body location.\n\n" - . "The second column is how many of those locations your body has.\n\n" - . "The third column is how many slots in that location are available.\n\n"; + "The first column is the name of the body location.\r" + . "The second column is how many of those locations your body has.\r" + . "The third column is how many slots in that location are available.\r"; $reply .= sprintf " %-20s %3s %5s\n", "Location", "You", "Avail"; for (0 .. cf::NUM_BODY_LOCATIONS - 1) { @@ -93,9 +93,9 @@ if $ob->slot_info ($_) or $ob->slot_used ($_); } - $reply .= "You are not allowed to wear armor\n\n" + $reply .= "You are not allowed to wear armor\r" unless $ob->flag (cf::FLAG_USE_ARMOUR); - $reply .= "You are not allowed to use weapons\n\n" + $reply .= "You are not allowed to use weapons\r" unless $ob->flag (cf::FLAG_USE_WEAPON); $ob->send_msg ("c/body" => $reply, cf::NDI_REPLY); @@ -148,8 +148,8 @@ my $map = $observe->map or return; - my $msg = sprintf "%s (%s) %s", $map->name, $map->path, $observe->region->longname; - $msg .= sprintf "\n\nplayers: %d difficulty: %d size: %d start: %dx%d timeout: %d", + my $msg = sprintf "%s (%s) %s\r", $map->name, $map->path, $observe->region->longname; + $msg .= sprintf "players: %d difficulty: %d size: %d start: %dx%d timeout: %d", (scalar $map->players), $map->difficulty, $map->width, $map->height, $map->enter_x, $map->enter_y, $map->timeout if $ob->flag (cf::FLAG_WIZ); @@ -386,9 +386,9 @@ no re 'eval'; $arg = qr<$arg>; - my $format = "%2s %1s %3s %5s %.60s\n"; + my $format = " %2s %1s %3s %5s %.60s\n"; - $ob->send_msg ("c/mapinfo" => (sprintf $format, "Pl", "I", "Svd", "Reset", "Name"), cf::NDI_REPLY | cf::NDI_CLEAR); + my $msg = "\n" . sprintf $format, "Pl", "I", "Svd", "Reset", "Name"; for (sort keys %cf::MAP) { my $map = $cf::MAP{$_} @@ -400,14 +400,14 @@ my $svd = int $cf::RUNTIME - $map->{last_save}; $svd = "++" if $svd > 99; - $ob->send_msg ("c/mapinfo" => - (sprintf $format, - (scalar $map->players), - $IN_MEMORY{$map->in_memory} || "?", - $svd, - (int $map->reset_at - $cf::RUNTIME), - $map->visible_name) - ); + $msg .= sprintf $format, + (scalar $map->players), + $IN_MEMORY{$map->in_memory} || "?", + $svd, + (int $map->reset_at - $cf::RUNTIME), + $map->visible_name; } + + $ob->send_msg ("c/mapinfo" => $msg, cf::NDI_REPLY | cf::NDI_CLEAR); };