--- cf.schmorp.de/maps/perl/commands.ext 2006/09/29 21:59:53 1.8 +++ cf.schmorp.de/maps/perl/commands.ext 2006/11/08 00:54:11 1.11 @@ -33,7 +33,7 @@ $ob->esrv_update_item (cf::UPD_NAME, $item); - return 1; + 1 } sub who_listing(;$) { @@ -66,7 +66,7 @@ . " [" . $pl->client . "]" . " [" . ($pl->peaceful || $privileged ? $ob->map->path : $ob->map->region ? $ob->map->region->name : "the unknown") . "]" . ($privileged ? " " . $pl->host : "") - } sort { $a->ob->name cmp $b->ob->name } @pl + } sort { (lc $a->ob->name) cmp (lc $b->ob->name) } @pl ) } @@ -74,12 +74,14 @@ my ($ob, $arg) = @_; $ob->reply (undef, (join "\n", who_listing $ob->flag (cf::FLAG_WIZ)), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE); + + 1 }; cf::register_command rename => $cf::TICK, sub { my ($ob, $arg) = @_; - if ($arg =~ /^\s* (?: <([^>]+)> \s+)? to \s+ <([^>]+)> \s*$/x) { + if ($arg =~ /^\s* (?: <([^>]+)> \s+)? to \s+ <([^>]*)> \s*$/x) { # compatibility syntax rename_to $ob, $1, $2; } elsif ($arg =~ / @@ -96,4 +98,7 @@ } else { $ob->reply (undef, 'Syntax error. Rename usage: rename ["oldname"] to "newname"'); } + + 1 }; +